David T

1

votes
0

answer
251

views

Intel TBB: read a file, apply a function for each line and save the result to a vector

With intel TBB I'm trying to read a file `serial', apply a function on each line of the file, and save the result to a vector of a type A. struct A { long long time; double price; A(long long t, double p) : time(t),price(p){}; } I have created the following pipeline vector parallelFile(string fileNa...
david.t_92
1

votes
1

answer
89

views

Improve OpenXML performance when inserting rows into Excel

I use OpenXML v 2.8.1.0 to create an excel report for a web site. Spreadsheet has 22 columns. Takes 30 seconds to render 15,000 rows, but that's too long for a web page. Can I do this more efficiently? Code snippet is below (left out parts not germane to the issue). Suspect I'm inefficient in all th...
David-T
1

votes
1

answer
153

views

Where Bytecode is stored

The question is very simple. Using as a reference the following image: As I understend the Ethereum Blockchain only stores the thinks that are inside the boxes (PREVHASH, STATE_ROOT, TIMSTAMP, NUMBER) and for each account (NONCE, BALANCE, CODEHASH, STORAGE_ROOT). So, where the code (In this case the...
david.t_92
1

votes
0

answer
50

views

What is libusc.so and why do I get crashes from there?

So, I'm in google play console, and I'm seeing some crashes from this mysterious libusc.so file. Specifically, here's the details when I open up the crash pid: 0, tid: 0 >>> com.myapp.blah
David T.
1

votes
0

answer
36

views

How to search crashes on google play store?

Is there an API I can use to search for a specific crash on Google play console? Whenever I go into the console on the web UI, there is only the ability to filter for crashes. However, this isn't very useful for finding a specific crash (for example, native crashes are desymbolicated much better on...
David T.
1

votes
2

answer
1.1k

views

Unable to upload file to device from eclipse

I'm running into an error where I can no longer upload/run my android app from eclipse on to a real device. I don't recall having changed anything particular that would cause this error. here's my error log from console in Eclipse: [2011-05-25 16:58:01 - Child Protector] Android Launch! [2011-05-25...
David T.
1

votes
1

answer
192

views

how can i force handling …/ih/… as a php script

I have numerous index.php scripts using SEO-friendly arg format like example.com/path/to/index.php/opt/arg and would like to rewrite or force a handler to have example.com/path/to/ih/opt/arg and thus shorten the index.php part. [Well, I'd like to get rid of it entirely, but don't want to go back to...
david t-g
1

votes
2

answer
1.2k

views

why does a static MediaPlayer instance not work for Android?

I'm open to suggestions. I'm writing an app that needs a music playing between all activities of the app, and pauses when the user hits 'home' or 'exits' the app by hitting back and getting out of my app. so here's what i did - i made a 'SoundController' class that contains a static instance of Medi...
David T.
1

votes
1

answer
414

views

XCode warning - duplicate CMakeLists.txt while trying to change project name

I tried to change the name of my xcode project, (which uses the cocos2d framework), but for some reason my main files folder (the one that contains all the .h and .mm files) wouldn't change the name. so then i manually clicked under 'MyProj TARGETS -> Build Settings' and manually changed the fields:...
David T.
1

votes
3

answer
111

views

How do I pass a variable from JSON to the originating Javascript? [duplicate]

This question already has an answer here: How do I return the response from an asynchronous call? 33 answers I am successfully sending a getJson request to lastFM using the code below. This code is within a javaScript script. Can I get the result from the getJson function and use it outside of that...
David T
1

votes
1

answer
318

views

Android: CalledFromWrongThreadException from WebView's shouldOverrideUrlLoading

I am developing on a library that is somehow getting a CalledFromWrongThread Exception crash on Samsung Galaxy S1 (api v7 - android 2.1). The code is something like this: class MyWebViewClient extends WebViewClient { @Override public void shouldOverrideUrlLoading(WebView view, String url) { someList...
David T.
1

votes
1

answer
817

views

Javascript not loading in Rails Test Environment

I can't get Javascript to load in the browser in the rails test environment. This is problematic for cucumber selenium tests through capybara. Here's my test.rb (the default as far as I know) MyApp::Application.configure do # Settings specified here will take precedence over those in config/applicat...
David T
1

votes
2

answer
1.1k

views

Android how to ignore auto resizing when keyboard pops up?

let's say I have a view that is made up of 2 layers -> top layer and bottom layer. I place them both in a frame layout. now, presumably, when i tap on the editText, the keyboard will pop up, and shrink the size of the edit text. However, it seems that the bottom layer is ALSO getting resized. How d...
David T.
1

votes
1

answer
1.1k

views

Using google drive API to access my own “public” folder android/iOS

I have a google drive account that i want people within a certain organization to be able to upload files to programmatically, and also as invisible as possible. as i'm following along the google drive SDK tutorials, i can't seem to find anything about uploading a file directly to MY drive account....
David T.
1

votes
1

answer
701

views

What all to download for Google Cloud Storage api java?

I'm trying to follow the documentation on how to use Google Cloud Storage with the new clients API, so I started on the downloads. Unfortunately, since I don't use Maven, i'm trying to download all of the jars. However, for several of the 'other downloads', I can't find the actual jar. Even more so,...
David T.
1

votes
2

answer
62

views

My view is not responding to setFrame if it is hidden

I had a submit button that i initially set as hiding. When I try to adjust the frame of it, i can't seem to get it to move? (The reason i make this assumption is because my keyboard covers the bottom half of the screen and i try to automatically adjust the button if the keyboard is up) So my hacky f...
David T.
1

votes
1

answer
564

views

Delphi XE7 BDE Alias - setting it at run time?

I use Delphi XE7, and one of our large legacy applications still uses the BDE extensively with Paradox tables. I know the BDE is deprecated, but we have no choice with this app. This app currently sets up the BDE aliases at run time, at startup. It uses the standard default Session provided by the B...
David T
1

votes
1

answer
106

views

Concurrent writes to different properties of GAE Datastore Entity

I'm using Google Appengine in Java flavor, and i'm trying to do the following: 1 - create an entity with property COUNT as 0. 2a - kick off a task queue task that does some network call, and updates a STATUS property for this same entity (using Datastore#put) 2b - meanwhile, in the original 'thread'...
David T.
1

votes
2

answer
107

views

MS Power Query: Sharing Queries across workbooks and xlam?

In Power Query, is it possible to build a query in one workbook and access it from another? In particular, can I build a whole set of queries into some kind of library? I'm thinking of, say, an .xlam file and then have multiple .xlsx files load the .xlam and use the queries I really want to stay a...
David T
1

votes
2

answer
278

views

preg_replace arrays with multiple patterns per replacement

I don't think I can do this in one swell foop, but I'm not above asking :-) I can certainly define one-to-one $pattern and $replacement arrays, and I can repeatedly define $pattern arrays and $replacement strings, but can I do both at once? Suppose I have three sets like: $p1 = array('sis','boom','b...
David T-G
1

votes
1

answer
40

views

How to get line count on all files create last month?

I am trying to get the line count for all *.rules file created last month. July. I have tried ls -ll *.rules |grep 'Jul'|while read line; do wc -l $line; done Doesn't work. Any help would be greatly appreciated.
David T.
1

votes
1

answer
629

views

Limiting refreshes in Excel Power Query

PROBLEM: I've a table which is refreshing when I don't need it to, and it's taking forever. In Power Query - I have several queries ganged together. NewAddsStage reads in a directory with ~10 workbooks from a networked sharedrive, appends the data together, filters it down a lot, and loads to a ta...
David T
1

votes
1

answer
127

views

How to create Multi-Destination-Cast in Aeron Library

I am trying to use the Multi-Destination-Cast transportation, but I don't know how to configure-it, I am trying to implement the Example URIs explained here using the SimplePublisher.java and the SimpleSubscriber.java I have one publisher and two subscribers. Of the default aeron parameters that car...
david.t_92
1

votes
2

answer
1.9k

views

Need to use a nested cursor and getting “invalid object name”

First, let me state right off that I'm well aware that cursors are generally evil and shouldn't be used - I'm all about using sets, but just couldn't come up with a set-based solution to this particular problem. If you tell me to go do some set-based operations, well, I'm all for it, if you can tel...
David T. Macknet
1

votes
1

answer
384

views

Android Is it safe to assume the “main/UI thread” ID is always 1?

I'm working on a jar file that gets included in other applications, and it has to be very robust. in the jar, i have an object, say SomeView, which takes in an Android Context, tries to create a Handler object, and will touch views, so it needs to be initialized from the main thread. How can i guara...
David T.
1

votes
2

answer
1.4k

views

Android - How to tell when a specific view has been rendered?

I have a regular button that I want to display a timer on. So imagine the text of the button changes every second as a countdown timer. However, I need this timer to only start when the button is fully rendered and ready to go on the screen. Right now I'm starting the timer (which is an AsyncTask) i...
David T.
1

votes
1

answer
1.4k

views

Difference between @VisibleForTesting and @Deprecated int unit test

Let's say that there just so happens to be an existing long private method (one of which i'm not allowed to refactor into smaller pieces at this stage in the development process) but i really want to write a couple of regression-protection unit test for it, just for now. i just heard of this @Visib...
David T.
1

votes
1

answer
413

views

Where is this Android Wear app? [closed]

I want to start developing apps on my smart watch, but i can't get the app to connect to my phone. I got stuck on even the first line: http://developer.android.com/training/wearables/apps/creating.html#SetupDevice where it says Install the Android Wear app, available on Google Play, on your handheld...
David T.
1

votes
1

answer
314

views

xcodebuild printing too much logs

I'm trying to use 2 commands: xcodebuild archive -workspace MyProject.xcworkspace -scheme Prod -configuration Prod -archivePath '${WORKSPACE}'/build/MyProject.xcarchive and xcodebuild -exportArchive -exportProvisioningProfile 'Prov Profile' -exportFormat IPA -exportPath '${WORKSPACE}'/build/MyProjec...
David T.
1

votes
2

answer
120

views

How to manage multiple long running feature branches in Git?

The git flow model works really well for a lot of small developmental branches. However, it starts to slightly break down when there are a multiple branches that are super long features. For example, suppose 2 features (feature_branch_a and feature_branch_b) both take 3 engineering months to finish...
David T.
1

votes
1

answer
70

views

Weird Issue of Argument Not Optional for Macro

I'm having trouble trying to get this code to work. It does work as intended without the (ByValue Target as Range) portion along with the ActiveCell.Value, but with these included in, I'm getting the error listed. I have a number of other functions depending on this and would like to see what I coul...
David T. Shin
0

votes
1

answer
13

views

'mutate' to add two columns with a single fn-call in tidyverse in R

This is an R Version 3.4.4 question A voting function voteOnBase, takes 2 arguments and returns a 2-element list: the WINNER and the VOTE.COUNT. I want to use it to add those two columns to notVotedYet, a tibble. The following code runs correctly. library(tidyverse) withVotes % group_by(BASE) %>%...
David T
1

votes
3

answer
411

views

Why is this C array NULL when indirectly called in my Objective-C code? (cocos2d)

i have two Objective-C classes, say ParentLayer and ChildLayer. in my child instance, i want to access a C-Array in my parent instance. so i have something like this in my cocos2d code: #define kNumOfElements 10 @implementation ParentLayer{ int array[kNumOfElements]; } -(id)init{ //... for(int i=0;i
David T.
1

votes
3

answer
1.3k

views

Rails - how to force refresh page upon item added

I'm making a simple rails (3.2.11) demo that only i will be accessing. I have the following: 1) a Rails scaffold named Food 2) an android device that can call in to a custom route/controller that will then create a new Food. (Food.create...). So, on my computer's browser, I load up http://myapp.com,...
David T.
1

votes
2

answer
129

views

Android - Is it safe to assuming MotionEvent.ACTION_UP will 100% mean a user has touched view?

I have a view (WebView to be specific). In that view, I have something like: setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_UP) { //user has clicked } } }); will this 100%, ALWAYS guarantee me that the u...
David T.
1

votes
1

answer
1k

views

Android - java.lang.NoSuchFieldError: android.graphics.Bitmap$CompressFormat.WEBP

I'm trying to use a very simple piece of code that has been supported since API 1. if (bitmap != null) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.WEBP, IMAGE_QUALITY, byteArrayOutputStream); byte[] bytes = byteArrayOutputStream...
David T.
1

votes
1

answer
778

views

How to use ACRA and also set UncaughtExceptionHandler?

In my application, i want to set the uncaught exception handler so that i can do stuff in the event that of an unforseen crash. (i want to do stuff like close out sockets, clear notification...etc.) Thread.currentThread().setDefaultUncaughtExceptionHandler(sDefaultThreadHandler); where private stati...
David T.
1

votes
1

answer
1k

views

Google Cloud Storage ACL not working for bucket

I granted access to certain users by their emails on my bucket, hosted on Google Cloud Storage. (like... [email protected]). however, whenever that person is logged in to their gmail account on chrome, they can't access the file. it just says permission denied. what's going on? the link i'm using is so...
David T.
1

votes
4

answer
803

views

Android robust threading Architecture? Asynctask vs thread/handler vs service/thread

Let's say you're designing the threading architecture for a an app -> the primary purpose is that your app will have a lot of tasks that need something done on the background thread, and sometimes a result task on UI thread, or something not (though more times, the result needs to be run on UI threa...
David T.
1

votes
2

answer
102

views

How to prevent type erasure?

I have a method that i want to refactor, and it looks (well, very much simplified) like this: import com.sun.tools.javac.util.Pair; private int foo(Pair... params) { if (params[0].snd instanceof String) { // do something return 0; } else if (params[0].snd instanceof ArrayList) { // do something else...
David T.

View additional