unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Attaching two memory databases === I am collecting data every second and storing it in a ":memory" database. Inserting data into this database is inside a transaction. Everytime one request is sending to server and server will read data from the first memory, do some calculation, store it in the second database and send it back to the client. For this, I am creating another ":memory:" database to store the aggregated information of the first db. I cannot use the same db because I need to do some large calculation to get the aggregated result. This cannot be done inside the transaction( because if one collection takes 5 sec I will lose all the 4 seconds data). I cannot create table in the same database because I will not be able to write the aggregate data while it is collecting and inserting the original data(it is inside transaction and it is collecting every one second) -- Sometimes I want to retrieve data from both the databses. How can I link both these memory databases? Using attach database stmt, I can attach the second db to the first one. But the problem is next time when a request comes how will I check the second db is exist or not? -- Suppose, I am attaching the second memory db to first one. Will it lock the second database, when we write data to the first db? -- Is there any other way to store this aggregated data??
0
[ 2, 19514, 68, 81, 1912, 6018, 18, 800, 3726, 3726, 31, 589, 10079, 1054, 352, 153, 17, 25615, 32, 19, 21, 13, 7, 45, 790, 5171, 93, 7, 6018, 9, 14692, 68, 1054, 77, 48, 6018, 25, 572, 21, 12799, 9, 352, 891, 53, 3772, 25, 49...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Custom button override in salesforce === I want to create a custom button override in Salesforce - I want to override the delete button - instead of deleting it I just want it to change the record type. I have searched vastly on line and cannot find anywhere that can help My custom object is Absence__c Any help or questions would be greatly welcome
0
[ 2, 5816, 5167, 84, 11891, 19, 2598, 8774, 800, 3726, 3726, 31, 259, 20, 1600, 21, 5816, 5167, 84, 11891, 19, 2598, 8774, 13, 8, 31, 259, 20, 84, 11891, 14, 27448, 5167, 13, 8, 700, 16, 121, 1336, 68, 32, 31, 114, 259, 32, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to convert mpeg-4 to H264-MPEG-4 codec === when i try to play a mp4 file format that has mpeg-4 as codec is not playing but normal H264-MPEG-4 codec files are playing. why? Is there is any fix?
0
[ 2, 184, 20, 8406, 307, 20427, 8, 300, 20, 746, 20470, 8, 79, 20427, 8, 300, 1797, 150, 800, 3726, 3726, 76, 31, 1131, 20, 418, 21, 4628, 300, 3893, 2595, 30, 63, 307, 20427, 8, 300, 28, 1797, 150, 25, 52, 791, 47, 1826, 746, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
modulus operator to run 1st and then every 3rd item === So i need it to run on the first loop and then every 3rd loop if ($k % 3 || $k==1 ) { echo '<div class="modcontainer">'; } Seems simple to me, but i don't have the understanding of modulus
0
[ 2, 13, 19673, 267, 6022, 20, 485, 137, 384, 17, 94, 352, 203, 897, 9101, 800, 3726, 3726, 86, 31, 376, 32, 20, 485, 27, 14, 64, 5293, 17, 94, 352, 203, 897, 5293, 100, 13, 5, 4403, 197, 13, 11881, 203, 13, 1, 5579, 197, 3726...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Swapping the Table columns in an Html page using pure Javascript === I am working on a table layout in which the columns get swapped by means of drag and drop operation on them. I need to do this using pure Javascript(no JQuery or similar frameworks or libraries). What it should be doing is that you'll be clicking on one of the columns of table, dragging it and dropping it on any desired column and the columns would get swapped(I don't just want to interchange the content but rather the whole column should be swapped). Whatever solution i found was using Jquery or other frameworks. I need to do this using only Javascript. Thanks in advance.
0
[ 2, 10143, 5574, 14, 859, 7498, 19, 40, 13, 15895, 2478, 568, 4267, 8247, 8741, 800, 3726, 3726, 31, 589, 638, 27, 21, 859, 9106, 19, 56, 14, 7498, 164, 29225, 34, 1108, 16, 5501, 17, 2804, 1453, 27, 105, 9, 31, 376, 20, 107, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Show Network Error in android === I have created appliction with webview. if i have do any action and the net is disconnected i want to display one alert. I have tried the following, added this in oncreate method. webview=(WebView)findViewById(R.id.webview1); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl("file:///android_asset/www/index.htm"); isConnected=isNetworkAvailable(); webview.setNetworkAvailable(isConnected); webview.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { isConnected=isNetworkAvailable(); if (isConnected) { // return false to let the WebView handle the URL return false; } else { // show the proper "not connected" message view.loadData(offlineMessageHtml, "text/html", "utf-8"); // return true if the host application wants to leave the current // WebView and handle the url itself return true; } } @Override public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) { if (errorCode == ERROR_TIMEOUT) { view.stopLoading(); // may not be needed view.loadData(timeoutMessageHtml, "text/html", "utf-8"); } } }); webview.setWebChromeClient(new WebChromeClient()); and added the following method to check net availablity public boolean isNetworkAvailable() { Context context = getApplicationContext(); ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity == null) { //boitealerte(this.getString(R.string.alert),"getSystemService rend null"); } else { NetworkInfo[] info = connectivity.getAllNetworkInfo(); if (info != null) { for (int i = 0; i < info.length; i++) { if (info[i].getState() == NetworkInfo.State.CONNECTED) { return true; } } } } return false; } if i clicking on the log in button, it should show an error message if net is not available. but it is not working. please check my code and tell me what i did wrong
0
[ 2, 298, 982, 7019, 19, 13005, 800, 3726, 3726, 31, 57, 679, 4865, 4663, 3309, 29, 2741, 4725, 9, 100, 31, 57, 107, 186, 1028, 17, 14, 4275, 25, 25730, 31, 259, 20, 3042, 53, 7863, 9, 31, 57, 794, 14, 249, 15, 905, 48, 19, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Count total results found based on country === I have a query that displays columns from multiple tables in a test dbase. The output are hotels from all over the world with their corresponding information. My search criteria is simple; no blank fields and I want their phone numbers that don't start with a + sign. It works but it displays all entries (like it should) BUT is it possible to only display the total number of items found, for example, per country? For example it displays 5000 lines in China, 3458 lines in Italy, 2050 lines in Canada etc etc.. Is it possible to just display the total amounts found? 5000 : China 3458 : Italy 2050 : Canada etc etc I've tried COUNT and HAVING but it hasn't worked for me so far. I also looked up a few topic here but still no success. This is my query: SELECT hotel.id HotelID, hotel.name Hotel_Name, hotel.tel_area Area_Number, hotel.tel Phone_Number, city.name City, region.name Region, country.name Country, country.id CountryID, country.continent Continent, hotel.web Website FROM mydata.hotel as hotel JOIN mydata.city as city ON hotel.city = city.id JOIN mydata.region as region ON region.id = city.region JOIN mydata.country as country ON country.id = region.country where hotel.tel not like '' and accos.tel not like '+%' order by country.name Anybody suggestions?
0
[ 2, 2468, 600, 1736, 216, 432, 27, 475, 800, 3726, 3726, 31, 57, 21, 25597, 30, 9412, 7498, 37, 1886, 7484, 19, 21, 1289, 13, 43, 8436, 9, 14, 5196, 50, 10499, 37, 65, 84, 14, 126, 29, 66, 7265, 676, 9, 51, 2122, 9157, 25, 19...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can a java subclass's private final field be initialized before the super constructor completes? === I have a pair of classes looking like this; public abstract class Class1 { //... public Class1() { //... function2(); //... } protected abstract void function2(); } public class Class2 implements Class1 { private final OnSomethingListener mOnSomethingListener = new OnSomethingListener() { @Override onSomething() { doThatOtherThing(); } } protected void function2() { //uses mOnSomethingListener //however mOnSomethingListener is null when this function is called from super() //... } public Class2() { super(); } } I assume the listener is null because I am effectively referencing it from `super()` and it hasn't instantiated yet. However, I want to make it `final` because, well, it is. Can I get this field (the listener) to initialize in time without putting it in the superclass (which won't be using the listener, ever)?
0
[ 2, 92, 21, 8247, 972, 1898, 22, 18, 932, 426, 575, 44, 2104, 1333, 115, 14, 1026, 6960, 248, 1279, 18, 60, 800, 3726, 3726, 31, 57, 21, 2146, 16, 2684, 699, 101, 48, 73, 317, 8502, 718, 718, 165, 13, 1, 12894, 9, 9, 9, 317, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Increasing the rate of broadcast intent receiver === I am using an broadcast receiver for Intent.ACTION_BATTERY_CHANGED. Rate at which I receive this intent in my application is every 5 sec. But I want to increase this rate as fast as possible. I dont know If this is possible or not. Help me if it is possible.
0
[ 2, 3425, 14, 1684, 16, 1992, 6936, 6264, 800, 3726, 3726, 31, 589, 568, 40, 1992, 6264, 26, 6936, 9, 8645, 1, 4900, 815, 93, 1, 16229, 43, 9, 1684, 35, 56, 31, 2588, 48, 6936, 19, 51, 3010, 25, 352, 331, 9265, 9, 47, 31, 259...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to dynamically add edit boxes in MATLAB GUI? === I use the inputdlg function to display a dialog box in which the user writes in several edit boxes. The number of boxes depends on the value of a variable, so I can have 3 ou 11 boxes but I figured out how to update the number of boxes in the dialog box according to the value of this variable. Now I want to do the same thing with a GUI (and not a simple dialog box) because I would like to add some features in it (like a static text) by using uicontrol. (I'm forced to do that because it's impossible to extract the handle of the dialog box displayed by inputdlg). When you do it with GUIDE, you have to specify how many boxes you have but I can't give a fixed number of boxes, it's variable. To sum up, I would like to dynamically increase the number of edit boxes in a GUI. How can I do that ? Thanks
0
[ 2, 184, 20, 7782, 1326, 3547, 9392, 8120, 19, 4277, 9086, 9457, 60, 800, 3726, 3726, 31, 275, 14, 6367, 43, 10641, 1990, 20, 3042, 21, 28223, 1649, 19, 56, 14, 4155, 6215, 19, 238, 9392, 8120, 9, 14, 234, 16, 8120, 9597, 27, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Django: check if an image exists at some particular url === Just wondering is there any way I can check whether the url links to a valid image or not in Django.
0
[ 2, 3857, 14541, 45, 2631, 100, 40, 1961, 5636, 35, 109, 1498, 287, 6362, 800, 3726, 3726, 114, 5712, 25, 80, 186, 161, 31, 92, 2631, 1472, 14, 287, 6362, 6271, 20, 21, 7394, 1961, 54, 52, 19, 3857, 14541, 9, 3, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
only first FAQ element expands on click - jquery === I'm trying to create an FAQ list. The answer displays fine on first click but I want to be able to click on another question and have that answer expand and the other close. Here's the javascript: $(document).ready(function() { // hide all the answers $('.faq li div').hide(); $('.faq li').click(function(){ var question = $(this); var answer = $(this).find('div'); // if the faq isn't active if(!$('.faq li').hasClass('active')) { answer.slideDown(); $(this).siblings('div').slideUp(); question.addClass('active'); } else { answer.slideUp(); question.removeClass('active'); } }); }); The CSS: ul.faq { list-style:none; cursor:pointer; z-index:1; } ul.faq li h3 { background:#0A5C75 url(../images/faq-inactive.png) right no-repeat; color:#fff; padding:20px 50px 20px 10px; margin-bottom:10px; border:1px solid #fff; } ul.faq li.active h3 { background:#0A5C75 url(../images/faq-active.png) right no-repeat; } ul.faq li div { background:#FFFFFF; margin:0px 10px 10px 10px; padding:20px; overflow:hidden; /* added fixed width to stop the jerkyness*/ width:522px; position:relative; top:-10px; box-shadow: inset 0px 4px 4px 0px rgba(63, 70, 76, 0.15), 0px 4px 4px rgba(63, 70, 76, 0.15); } and the HTML <ul class="faq"> <li> <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut arcu magna, sodales vel dignissim pharetra, adipiscing sed orci?</a></h3> <div>Vivamus rutrum arcu sit amet dolor pulvinar dictum. Etiam porttitor leo eget velit volutpat quis ultricies urna ornare. Quisque ac ultrices est. Ut lobortis malesuada justo, sed blandit sapien bibendum et. Donec vel ante eu orci pellentesque dictum. Phasellus molestie egestas du</div> </li> <li> <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut arcu magna, sodales vel dignissim pharetra, adipiscing sed orci?</a></h3> <div>This is the answer to question 2</div></li> <li> <h3>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut arcu magna, sodales vel dignissim pharetra, adipiscing sed orci?</a></h3> <div>This is the answer to question 3</div> </li> </ul>
0
[ 2, 104, 64, 1399, 1251, 4520, 6073, 18, 27, 10840, 13, 8, 487, 8190, 93, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 40, 1399, 1251, 968, 9, 14, 1623, 9412, 1123, 27, 64, 10840, 47, 31, 259, 20, 44, 777, 20, 10840, 27, 226, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Implement Repository FindAll() Method? === I have the following Repository Pattern using **LINQ to SQL**. Requirement is to “Find All accounts whose owner’s name is Lijo”. So, I need to write a FindAll function. How to write this function? Constraints are: 1) The client “BankAccountService” should not use classes from 'DBML_Project'. 2) We should NOT use GetAll method to retireve complete list of accounts and then do a filter. namespace ApplicationService_Bank { public class BankAccountService { RepositoryLayer.ILijosBankRepository accountRepository = new RepositoryLayer.LijosSimpleBankRepository(); public void FreezeAllAccountsForUser(string userName) { //Should not use assembly 'DBML_Project'. IEnumerable<DomainEntitiesForBank.IBankAccount> accountsForUserWithNameLIJO = null; //accountsForUserWithNameLIJO = accountRepository.FindAll(p => p.BankUser.Name == "Lijo"); } } } namespace RepositoryLayer { public interface ILijosBankRepository { List<DomainEntitiesForBank.IBankAccount> GetAll(); IEnumerable<DBML_Project.BankAccount> FindAll(System.Func<DBML_Project.BankAccount, bool> predicate); void SubmitChanges(); } public class LijosSimpleBankRepository : ILijosBankRepository { private IBankAccountFactory bankFactory = new MySimpleBankAccountFactory(); public System.Data.Linq.DataContext Context { get; set; } public virtual List<DomainEntitiesForBank.IBankAccount> GetAll() { List<DBML_Project.BankAccount> allItems = Context.GetTable<DBML_Project.BankAccount>().ToList(); List<DomainEntitiesForBank.IBankAccount> bankAccounts = new List<DomainEntitiesForBank.IBankAccount>(); foreach (DBML_Project.BankAccount acc in allItems) { DomainEntitiesForBank.IBankAccount theAccount = bankFactory.CreateAccount(acc.AccountType, acc.BankAccountID, acc.Status, acc.OpenedDate, acc.AccountOwnerID); bankAccounts.Add(theAccount); } return bankAccounts; } public IEnumerable<DBML_Project.BankAccount> FindAll(System.Func<DBML_Project.BankAccount, bool> predicate) { //Where var results = Context.GetTable<DBML_Project.BankAccount>().Where(predicate); return results; } public virtual void SubmitChanges() { Context.SubmitChanges(); } } }
0
[ 2, 184, 20, 8713, 24869, 477, 1233, 5, 6, 2109, 60, 800, 3726, 3726, 31, 57, 14, 249, 24869, 3732, 568, 13, 1409, 1226, 1251, 20, 4444, 255, 1409, 9, 8981, 25, 20, 13, 1, 19811, 65, 5310, 1196, 2410, 1, 18, 204, 25, 2093, 1636...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IOException raise in parser === i am make an application in which i get call webservices and fill data. but here due to some odd things are occure.i got error with arrayIndexoutofBound with IOException... i have use SAX parser for parseing simple webservices. Error:: 07-02 16:50:52.992: E/NearbyScreen(31762): SAX PARSER ERRORjava.lang.ArrayIndexOutOfBoundsException: length=8192; regionStart=-2888; regionLength=11080 07-02 16:50:52.992: W/System.err(31762): java.lang.ArrayIndexOutOfBoundsException: length=8192; regionStart=-2888; regionLength=11080 07-02 16:50:53.002: E/NearbyScreen(31762): SAX PARSER ERRORjava.io.IOException: Attempted read on closed stream. 07-02 16:50:53.002: W/System.err(31762): at java.util.Arrays.checkOffsetAndCount(Arrays.java:1731) 07-02 16:50:53.012: W/System.err(31762): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:484) 07-02 16:50:53.012: W/System.err(31762): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46) 07-02 16:50:53.012: W/System.err(31762): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240) 07-02 16:50:53.012: W/System.err(31762): at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103) 07-02 16:50:53.012: W/System.err(31762): at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134) **code ::** DefaultHttpClient client = new DefaultHttpClient(); String ConcateURL = String.valueOf(newViewPortlatitude) + "," + String.valueOf(newViewPortlongitude)+"/TOUR/1000/1/5/"; URL URLPush = new URL(getString(R.string.NearbyURL)+ConcateURL); Log.i(TAG, "** URL ** ->" + URLPush); HttpGet httpGet = new HttpGet(URLPush.toURI()); HttpParams httpParams = httpGet.getParams(); int timeoutdConnection = 30000; HttpConnectionParams.setConnectionTimeout(httpParams, timeoutdConnection); httpGet.setParams(httpParams); HttpResponse response = client.execute(httpGet); HttpEntity entity = response.getEntity(); if (entity != null) { Log.i("MyMapActivity", "--1--"); instream = entity.getContent(); Log.i("MyMapActivity", "--2--"); } if (instream != null) { Log.i("MyMapActivity", "--3--"); /********** test *******/ SAXParserFactory saxPF = SAXParserFactory.newInstance(); SAXParser saxP = saxPF.newSAXParser(); XMLReader xmlR = saxP.getXMLReader(); System.out.println("url >>>>>" + URLPush); NearByHandler myXMLHandler = new NearByHandler(); xmlR.setContentHandler(myXMLHandler); xmlR.parse(new InputSource(instream)); instream.close(); whaleWatchingInfoList = myXMLHandler.getQuotes(); // Fill Arraylist by Handler Log.i(TAG, "whaleWatchingInfoList size " + whaleWatchingInfoList.size()); Log.w("AndroidParseXMLActivity", "Done"); } }catch (ConnectTimeoutException e) { Log.e(TAG, "ConnectionTimeOUT " + e); IsConnectionTimeoutException = true; //Flag ConnectionTimout } catch (Exception e) { Log.e(TAG, "SAX PARSER ERROR" + e); e.printStackTrace(); //Flag ConnectionTimout }
0
[ 2, 13, 1963, 10066, 872, 3972, 19, 2017, 4104, 800, 3726, 3726, 31, 589, 233, 40, 3010, 19, 56, 31, 164, 645, 2741, 11449, 18, 17, 3509, 1054, 9, 47, 235, 397, 20, 109, 4210, 564, 50, 3744, 62, 9, 49, 330, 7019, 29, 7718, 2567...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to tell credit card's country of origin by its number? === I'm trying to develop an application, which would give access to different services for people from different regions of the world. Let's say, someone enters card number 1111-1111-1111-1111 . How do I use it to tell the country of origin? I know that this is possible, because paypal and apple do it.
0
[ 2, 184, 20, 494, 3251, 2056, 22, 18, 475, 16, 2986, 34, 82, 234, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 2803, 40, 3010, 15, 56, 83, 590, 1381, 20, 421, 687, 26, 148, 37, 421, 3332, 16, 14, 126, 9, 408, 22, 18, 395, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I check existence of texture in shader programming? === `g_MeshTexture` : texture file name sampler MeshTextureSampler = sampler_state { Texture = <g_MeshTexture>; MipFilter = LINEAR; MinFilter = LINEAR; MagFilter = LINEAR; }; : sampler I use "`tex2D(MeshTextureSampler, In.TextureUV)`" Which condition in HLSL is similar to `if(g_MeshTexture == NULL)` in C++?
0
[ 2, 184, 92, 31, 2631, 3012, 16, 12714, 19, 7546, 139, 3143, 60, 800, 3726, 3726, 13, 1, 263, 1, 79, 6134, 11969, 4221, 1, 13, 45, 12714, 3893, 204, 5717, 139, 55, 1635, 11969, 4221, 18, 10158, 1252, 800, 5717, 139, 1, 3859, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Use Python on MAMP === Nom Prénom Adresse mail Hi, I'm slowly migrating from PHP to Python. In particular, as I work in webdev/webdesign I would like to display a basic HTML page using Python, using the following code : #!/usr/bin/python print('<html><head></head><body>This is a test</body></html>'); Again, the point is just to see if it works. Sending the file online on my host as index.cgi I've had no problem displaying the content of the file. The problems start when I try to install the WSGI module on MAMP, or just to make Python work in general with it. When It go to localhost/index.cgi the content of the file is displayed instead of its results. I've followed half a dozen tutorials and none seems to work, I always encounter a problem at one point or another. It seems to come from the fact that Apache that comes with MAMP isn't built in a way that lets you add modules to it (such as wsgi). This is also comes from the fact that I can't find any **recent** article on how to install Python on MAMP, they all either date from 2008 or 2009, with old versions of MAMP, Python and Macports. Can somebody points me to the current procedure to make this work ?
0
[ 2, 275, 20059, 27, 1216, 2554, 800, 3726, 3726, 90, 79, 782, 251, 79, 21, 19137, 870, 4216, 4148, 15, 31, 22, 79, 1447, 28749, 37, 13, 26120, 20, 20059, 9, 19, 1498, 15, 28, 31, 170, 19, 2741, 14438, 118, 14113, 19862, 31, 83, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Login in a JSF page using java === I'm trying to Login in a .jsf intranet page, here is part of it: <form method="POST" action="j_security_check" name="loginForm" id="loginForm"> <input name="j_username" type="text" class="textbox" maxlength="30"/> <input name="j_password" type="password" class="textbox" maxlength="30"/> <input type=submit value="Enter" class="button"> <input type=submit value="Exit" class="button"> </form> I've searched and tryied something like this at java, but it didn't worked: HttpPost httppost2 = new HttpPost("xxxxxx.jsf"); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); nameValuePairs.add(new BasicNameValuePair("j_username", "33232676")); nameValuePairs.add(new BasicNameValuePair("j_password", "(1412Li15)")); httppost2.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response2 = httpclient.execute(httppost2); String str = inputStreamToString(response2.getEntity().getContent)).toString(); (I'm using httpcomponents-client-4.2) Thank you guys.
0
[ 2, 184, 20, 6738, 108, 19, 21, 487, 18, 410, 2478, 568, 8247, 800, 3726, 3726, 31, 22, 79, 749, 20, 6738, 108, 19, 21, 13, 9, 728, 18, 410, 14369, 2328, 2478, 15, 235, 25, 141, 16, 32, 45, 13, 1, 4190, 2109, 3726, 7, 6962, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SharePoint returns extra system columns === I do query to SherePoint. I have created query, viewquery and query options. Web services returns me great results, but it include some other system columns such as: `ows_Modified` , `ows_DocIcon`, `ows_Editor`. I don't want them. How do I return only those which is in ViewQuery string? My queryoptions is: @"<QueryOptions> <IncludeMandatoryColumns>False</IncludeMandatoryColumns><ViewAttributes Scope='Recursive' /> </QueryOptions>"; Thanks!
0
[ 2, 1891, 3132, 4815, 2230, 329, 7498, 800, 3726, 3726, 31, 107, 25597, 20, 39, 99, 3132, 9, 31, 57, 679, 25597, 15, 1418, 8190, 93, 17, 25597, 6368, 9, 2741, 687, 4815, 55, 374, 1736, 15, 47, 32, 468, 109, 89, 329, 7498, 145, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why do I get multiple instances of NSDocument but only one window? === In my Document based application, no less than **three** documents are opened when I run the app, yet only one window displays. When I save&quit, it saves *another* document than the one that belongs to the window. How can this happen? In particular, I do not want multiple instances of `NSDocument`, how can I avoid this at startup?
0
[ 2, 483, 107, 31, 164, 1886, 13946, 16, 13, 2172, 28132, 47, 104, 53, 1463, 60, 800, 3726, 3726, 19, 51, 4492, 432, 3010, 15, 90, 787, 119, 13, 1409, 5642, 1409, 4374, 50, 520, 76, 31, 485, 14, 4865, 15, 768, 104, 53, 1463, 941...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Wireless Localization === I want to develop a software that does indoor localization using signal strength! I need to know how to communicate with wireless driver to read signal strength! and I also need to know how to measure the device distance using signal strength.
1
[ 2, 10149, 375, 1829, 800, 3726, 3726, 31, 259, 20, 2803, 21, 2306, 30, 630, 5906, 375, 1829, 568, 2800, 2169, 187, 31, 376, 20, 143, 184, 20, 8709, 29, 10149, 2425, 20, 1302, 2800, 2169, 187, 17, 31, 67, 376, 20, 143, 184, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Building up an array an element at a time === Currently I'm populating an array in one line, e.g. self.monthMonths = [[NSArray alloc] initWithObjects:@"January", @"February", @"March", @"April", @"May", @"June",@"July",@"August",@"September",@"October",@"November",@"December", nil]; What is the syntax to add these elements one at a time as I want to pull the data from a database. I'm using the months of the year as an example. while([results next]) { NSString *months = [results stringForColumn:@"month"]; self.month = [[NSArray alloc] initWithObjects:@"month",nil]; //[NSArray NSLog(@"Month: %@",month); }
0
[ 2, 353, 71, 40, 7718, 40, 4520, 35, 21, 85, 800, 3726, 3726, 871, 31, 22, 79, 1675, 10038, 40, 7718, 19, 53, 293, 15, 13, 62, 9, 263, 9, 1119, 9, 6444, 6444, 18, 800, 636, 2558, 103, 4964, 2787, 65, 2499, 500, 19, 242, 1410,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GWT integration with PhoneGap === **Edit** - I know there are *similar* questions to this on SO, but I feel my specific questions are not duplicates at all. If you disagree with me please bring them to my attention before downnvoting or closevoting! If you can prove to me that my question is a true duplicate I will delete this question myself! My understanding of the GWT is that it provides an SDK and API that allows you to code in Java, and it generates all the client-side HTML, CSS and JavaScript required to run a full-fledged web (or mobile web) app. My understanding of PhoneGap is that it allows you to code against its JavaScript API and, through configuration, allows you to tell it which native mobile platforms (Android, iOS, Windows Phone, etc.) it should create nativee wrappers for. Hence you "write once, run many" with it, turning your JavaScript code into a native Android app, native iOS app, etc. If these two assumption are incorrect, please begin by correcting me! And, if there are any caveats to these assumptions, please let me know! Assuming my understanding on GWT and PhoneGap are more or less correct, I want to try and use them together for an app that would be available as (1) a web app, (2) a mobile web app, (3) an Android app and (4) as an iOS app. I want to "daisy-chain" these two in my Ant build, whereby my pure Java code is converted (via GWT) into JavaScript (that complies to the PhoneGap API), and then a second build process uses PhoneGap to create and deploy: * A Java WAR (web and mobile web app) * An Android APK * An iOS binary (I *believe* this is an IPA file, but I may be wrong) So with those as the "givens", here are my questions: * Is this possible? If not, why? Any way to hack- or juryrig-together a solution that *forces* this to work? * I've noticed something called `gwt-phonegap` - will I **need* this in order for my proposed solution to work, or would this library just be a "nice to have"? Why or why not? * Any other considerations I am not thinking of here? Other libraries or tools that would behoove me? **Note:** I have *heard* (but am not asserting!) that Titanium is superior to PhoneGap. Titanium, however, is not free. And I am quite broke. Thanks in advance for any help here!
0
[ 2, 14094, 38, 8078, 29, 1132, 1136, 306, 800, 3726, 3726, 13, 1409, 69, 242, 1409, 13, 8, 31, 143, 80, 50, 1637, 19107, 2483, 2346, 20, 48, 27, 86, 15, 47, 31, 583, 51, 1903, 2346, 50, 52, 19429, 18, 35, 65, 9, 100, 42, 1827...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.Net System.Timers.Timer: What happens if I use less than 1ms interval? === What happens if I set the interval on a System.Timers.Timer to .5 ? This is some more text that I'm adding so the stupid filter will let me post this question.
0
[ 2, 13, 9, 2328, 329, 9, 891, 1224, 9, 891, 139, 45, 98, 5531, 100, 31, 275, 787, 119, 137, 79, 18, 14422, 60, 800, 3726, 3726, 98, 5531, 100, 31, 309, 14, 14422, 27, 21, 329, 9, 891, 1224, 9, 891, 139, 20, 13, 9, 264, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to write to one table from multiple databases === I am trying to write to one table from multiple databases using a foreach loop. The user chooses a "Start semester" and an "End semester" from a drop down list, and those two semesters are stored into an array called $semesterarray // If $semesterarray contains 10 and 11, I want to be able to view the // courses taken in the 10 semester and the 11 semester under two separate columns. foreach ($semesterarray as $key => $semester) { $query = "SELECT course1,course2,course3 FROM $semester"; $result = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { // row displays: [course1]=> [course2]=> [course3]=> // Add semester code to array Keys to indicate proper semester // [course1.11]=> [course2.11]=> [course3.11]=> foreach ($row as $key => $value) { $row[$key.".".$semester] = $value; unset($row[$key]); } $startcourse1 = $row['course1.'.$semester]; $startcourse2 = $row['course2.'.$semester]; $startcourse3 = $row['course3.'.$semester]; $startcoursesarray = array($startcourse1, $startcourse2, $startcourse3); $startcourses = implode("<br>", $startcoursesarray); $endcourse1 = $row['course1.'.$semester]; $endcourse2 = $row['course2.'.$semester]; $endcourse3 = $row['course3.'.$semester]; $endcoursesarray = array($endcourse1, $endcourse2, $endcourse3); $endcourses = implode("<br>", $endcoursesarray); echo "<tr bgcolor=#ABB5F6> <td>$startcourses</td> <td>$endcourses</td> </tr>"; } } Any ideas?
0
[ 2, 184, 20, 2757, 20, 53, 859, 37, 1886, 6018, 18, 800, 3726, 3726, 31, 589, 749, 20, 2757, 20, 53, 859, 37, 1886, 6018, 18, 568, 21, 26, 14322, 5293, 9, 14, 4155, 3538, 18, 21, 13, 7, 13680, 13738, 7, 17, 40, 13, 7, 2451, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Use Simple Product Pricing for Configurable Products === I installed extension http://www.magentocommerce.com/magento-connect/simple-configurable-products.html for configurable products pricing. In description it says that we need to set-up: System->Configuration->SCP Products. On Back-end I can't see this section. Can someone help how to fix this problem? I don't want to use tier price, so this extension seems perfect but I can't make it to work
0
[ 2, 275, 1935, 2374, 24318, 26, 1065, 13549, 579, 1985, 800, 3726, 3726, 31, 4066, 3896, 7775, 6903, 6483, 9, 9473, 17050, 26470, 9, 960, 118, 9473, 17050, 8, 25996, 118, 24629, 8, 1126, 13549, 579, 8, 14086, 18, 9, 15895, 26, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
vmware command line mount cdrom from host === I have some Linux vmhost machines running vmware workstation 7. They each host a Windows XP vm. I'm looking for a command (to include in a scripts on a remote host) that will mount an ISO as a cdrom from the host onto the VMs. The idea is that the XP VMs need to see this event as though somebody has just pushed a cdrom into a physical drive. I've played with vmware-mount utility (on the host) but I can't seem to get it to work. Any help is appreciated.
0
[ 2, 13, 20147, 5011, 1202, 293, 2149, 1745, 8541, 37, 2015, 800, 3726, 3726, 31, 57, 109, 13024, 13, 20147, 11694, 6035, 946, 13, 20147, 5011, 170, 10839, 453, 9, 59, 206, 2015, 21, 1936, 23045, 13, 20147, 9, 31, 22, 79, 699, 26, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WPF mutliple Textbox validation with range and unique value === I'm new to WPF and I hope I'm asking the question correctly. I need to group multiple textboxes together and make sure they each have a unique value and that their values all fall within a specific number range. I figured out the range validation from here: [http://msdn.microsoft.com/en-us/library/ms753962.aspx][1] . But I'm not sure how to make sure each textbox has a unique value. What would be the best way to go about this? <StackPanel Orientation="Vertical" > <TextBox x:Name="txtVar1" Style="{StaticResource textBoxInError}" Validation.ErrorTemplate="{StaticResource validationTemplate}"> <TextBox.Text> <Binding Path="Var1" UpdateSourceTrigger="PropertyChanged"> <Binding.ValidationRules> <local:VariableValidationRule MinValue="1" MaxValue="200" ErrorMessage="Variable must be between 1 and 200" /> </Binding.ValidationRules> </Binding> </TextBox.Text> <TextBox x:Name="txtVar2" Style="{StaticResource textBoxInError}" Validation.ErrorTemplate="{StaticResource validationTemplate}"> <TextBox.Text> <Binding Path="Var2" UpdateSourceTrigger="PropertyChanged"> <Binding.ValidationRules> <local:VariableValidationRule MinValue="1" MaxValue="200" ErrorMessage="Variable must be between 1 and 200" /> </Binding.ValidationRules> </Binding> </TextBox.Text> </StackPanel> [1]: http://msdn.microsoft.com/en-us/library/ms753962.aspx
0
[ 2, 619, 7721, 13, 7903, 6013, 413, 1854, 5309, 27999, 29, 978, 17, 2619, 1923, 800, 3726, 3726, 31, 22, 79, 78, 20, 619, 7721, 17, 31, 1376, 31, 22, 79, 3379, 14, 1301, 12044, 9, 31, 376, 20, 214, 1886, 1854, 5309, 160, 429, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to setup php to run from a single location in Nginx === I've been struggling with this for some time now. I want to setup a Wordpress blog to run from a "/blogname" path on a server instead of the root. I also want the path to have a different name then the directory where the Wordpress scripts are since the server itself will run django. I have Nginx as a reverse proxy and I set up php-fpm to run the wordpress. Here's my Nginx configuration file: http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; #tcp_nopush on; #gzip on; server { root /Users/username/Dev/Wordpress/; index index.php index.html index.htm; listen 8080; server_name localhost; # Do not serve hidden files location ~ /\. { access_log off; log_not_found off; deny all; } # Static files location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { expires max; add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; } # This is the problem location /blogname { try_files $uri $uri/ /index.php; rewrite /blogname(.*) /blog$1 last; fastcgi_index index.php; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /Users/username/Dev/Wordpress/blog$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; } } } Right now when I visit localhost:8080/blogname I just download the index.php script instead of executing it. Other tips are also welcome.
0
[ 2, 184, 20, 18161, 13, 26120, 20, 485, 37, 21, 345, 1474, 19, 13, 2723, 108, 396, 800, 3726, 3726, 31, 22, 195, 74, 7587, 29, 48, 26, 109, 85, 130, 9, 31, 259, 20, 18161, 21, 833, 5890, 8146, 20, 485, 37, 21, 13, 7, 118, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android: onAudioFocusChange listener not called === As a side-project, I recently tried some audio playing in Android. So far, with API 8 (2.2) in mind, I was able to do a nice GUI and playing some music. Something really crude, bear in mind. It works like this. An activity hold the GUI and the Click events, and a bind service hold the media player. This way, the sound will continue to play once the activity is closed. It worked well for a bit, but recently, I don't remember what I did, but the event onAudioFocusChange is not called anymore. **Here is the bind service [MusicService.java] :** package com.red.idroids; import java.io.IOException; import android.app.Service; import android.content.Intent; import android.media.AudioManager; import android.media.MediaPlayer; import android.os.Binder; import android.os.IBinder; import android.os.PowerManager; public class MusicService extends Service implements AudioManager.OnAudioFocusChangeListener, MediaPlayer.OnPreparedListener { // Binder given to clients private final IBinder mBinder = new LocalBinder(); // Media Player MediaPlayer mMediaPlayer = null; // Android Audio Manager AudioManager mAudioManager; public class LocalBinder extends Binder { MusicService getService() { // Return this instance of LocalService so clients can call public methods return MusicService.this; } } @Override public IBinder onBind(Intent arg0) { return mBinder; } @Override public void onCreate () { mAudioManager = (AudioManager) getSystemService(AUDIO_SERVICE); requestFocus(); } public boolean requestFocus() { return AudioManager.AUDIOFOCUS_REQUEST_GRANTED == mAudioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); } public boolean abandonFocus() { return AudioManager.AUDIOFOCUS_REQUEST_GRANTED == mAudioManager.abandonAudioFocus(this); } @Override public void onDestroy() { if (mMediaPlayer != null) mMediaPlayer.release(); } private void initMediaPlayer() { mMediaPlayer = new MediaPlayer(); mMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK); mMediaPlayer.setOnPreparedListener(this); } public void playMedia(String path) { if(requestFocus()) { try { mMediaPlayer.setDataSource(path); mMediaPlayer.prepareAsync(); // prepare async to not block main thread } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } @Override public void onPrepared(MediaPlayer arg0) { mMediaPlayer.start(); } @Override public void onAudioFocusChange(int focusChange) { switch (focusChange) { case AudioManager.AUDIOFOCUS_GAIN: // resume playback if (mMediaPlayer == null) initMediaPlayer(); else if (!mMediaPlayer.isPlaying()) mMediaPlayer.start(); mMediaPlayer.setVolume(1.0f, 1.0f); break; case AudioManager.AUDIOFOCUS_LOSS: // Lost focus for an unbounded amount of time: stop playback and release media player if (mMediaPlayer.isPlaying()) mMediaPlayer.stop(); mMediaPlayer.release(); mMediaPlayer = null; break; case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT: // Lost focus for a short time, but we have to stop // playback. We don't release the media player because playback // is likely to resume if (mMediaPlayer.isPlaying()) mMediaPlayer.pause(); break; case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK: // Lost focus for a short time, but it's ok to keep playing // at an attenuated level if (mMediaPlayer.isPlaying()) mMediaPlayer.setVolume(0.1f, 0.1f); break; } } } **Here is the main activity [IDroidsActivity.java] :** package com.red.idroids; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.view.View; import com.red.idroids.MusicService.LocalBinder; public class IDroidsActivity extends Activity { MusicService mService; boolean mBound = false; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected void onStart() { super.onStart(); // Bind to LocalService Intent intent = new Intent(this, MusicService.class); startService(intent); bindService(intent, mConnection, 0); } @Override protected void onStop() { super.onStop(); // Unbind from the service if (mBound) { unbindService(mConnection); mBound = false; } } public void onButtonClick(View v) { if (mBound) { // Call a method from the LocalService. // However, if this call were something that might hang, then this request should // occur in a separate thread to avoid slowing down the activity performance. mService.playMedia("/sdcard/media/audio/Bloc.A RWA.mp3"); } } /** Defines callbacks for service binding, passed to bindService() */ private ServiceConnection mConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName className, IBinder service) { // We've bound to LocalService, cast the IBinder and get LocalService instance LocalBinder binder = (LocalBinder) service; mService = binder.getService(); mBound = true; } @Override public void onServiceDisconnected(ComponentName arg0) { mBound = false; } }; } **And the app manifest:** <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.red.idroids" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/> <uses-permission android:name="android.permission.WAKE_LOCK" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".IDroidsActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <service android:name="MusicService"></service> </application> </manifest> In the service, the OnPreparedListener interface is fully implemented and works perfectly. But OnAudioFocusChange used to work at first, but since I obviously did something I can't remember, I have absolutly no idea why it is not working. - requestFocus() and abandonFocus() works perfectly on their own - the service just never goes into the receiver for audio focus. No ammount of log works, it just not goes in there at all. I'm kind of lost. Do anybody here has any idea about what is the cause of this?
0
[ 2, 13005, 45, 27, 1346, 6921, 23371, 16229, 21772, 52, 227, 800, 3726, 3726, 28, 21, 270, 8, 21011, 15, 31, 1989, 794, 109, 4023, 791, 19, 13005, 9, 86, 463, 15, 29, 21, 2159, 469, 13, 5, 135, 9, 135, 6, 19, 594, 15, 31, 23,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GNU Octave, round a number to units precision === In GNU Octave version 3.4.3 I want to round a matrix to 2 units precision on the contents of a matrix like this. mymatrix=[1.1234567, 2.12345; 3.1234567891, 4.1234]; disp(mymatrix); This prints: 1.1235 2.1235 3.1235 4.1234 As you can see, the disp forces the precision to '5', I want the units precision to be 2. How do I do this?
0
[ 2, 26092, 22582, 15, 560, 21, 234, 20, 1398, 13133, 800, 3726, 3726, 19, 26092, 22582, 615, 203, 9, 300, 9, 240, 31, 259, 20, 560, 21, 8187, 20, 172, 1398, 13133, 27, 14, 8478, 16, 21, 8187, 101, 48, 9, 51, 540, 17224, 3726, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multiple update to the same row in database === I'm making a Billing system with some friends, it works this way: The customers make calls. The customers hangup the call. The price of the call is calculated. The price of the call is reduced from the customer's credit. We decided to make the following: Get the user's balance and store it in a variable, $balance, after do a $balance = $balance - $callprice, and finally update the database. The problem is that the customer can make simultaneous calls, and if two calls finish at the same time, and one of them gets the value on the database before the other script had updated the new balance... one of the calls will be lost. I'm using php. Any idea how can I do it? Thanks, and sorry, I have a poor English...
0
[ 2, 1886, 11100, 20, 14, 205, 3131, 19, 6018, 800, 3726, 3726, 31, 22, 79, 544, 21, 1071, 68, 329, 29, 109, 954, 15, 32, 693, 48, 161, 45, 14, 5279, 233, 3029, 9, 14, 5279, 4546, 576, 14, 645, 9, 14, 2162, 16, 14, 645, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Remember me or not? === Is it good to have the remember me feature? Would it be somewhat safe (knowing it won't be 100% safe) to allow users to close their browser and come back still logged in? I am not exacting sure which way I should go after reading different things about safety. I learned about session fixation and implemented security to add more protection. From experience, if remember me is checked then only your username/email appears and requires you to re-enter your password. Other sites allow you to come in and out as much as you way without logging out after the browser has closed. If it is good, what is the current best way of implementing remember/stay logged in? - http://stackoverflow.com/questions/3531377/best-practise-for-remember-me-feature - http://stackoverflow.com/questions/5087969/what-is-the-code-for-stay-logged-in-or-remember-me-while-user-login-in-php - http://bytes.com/topic/php/answers/881197-stay-logged-remember-me-php-sessions-cookies - http://security.stackexchange.com/questions/41/good-session-practices Also: The site I am working on is email & password login type.
2
[ 2, 1518, 55, 54, 52, 60, 800, 3726, 3726, 25, 32, 254, 20, 57, 14, 1518, 55, 1580, 60, 83, 32, 44, 4131, 1834, 13, 5, 17806, 68, 32, 230, 22, 38, 44, 12849, 1834, 6, 20, 1655, 3878, 20, 543, 66, 16495, 17, 340, 97, 174, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where can I get help about samsung officeserv 7200 pbx? === samsung officeserv 7200 is a hardware pbx (like asterisk but hardware). I need to integrate it with other system. but I can't find a programing API. and I don't know where to start. help me.
2
[ 2, 113, 92, 31, 164, 448, 88, 22981, 488, 10321, 453, 4621, 13, 13390, 396, 60, 800, 3726, 3726, 22981, 488, 10321, 453, 4621, 25, 21, 7610, 13, 13390, 396, 13, 5, 1403, 28, 591, 20989, 47, 7610, 6, 9, 31, 376, 20, 18399, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
UITableView's allowsMultipleSelectionDuringEditing - don't display edit circle for some cells === I am trying to delete some rows in my uitableview with by setting allowsMultipleSelectionDuringEditing to YES. This is all working well, circle showing on the left hand side. However, for some particular cell, I don't want to circle on the left hand side to come up. How do I do that? I've try cell.selectionStyle = UITableViewCellSelectionStyleNone during editing and that didn't work. Any hints?
0
[ 2, 13, 11193, 579, 4725, 22, 18, 2965, 21531, 18534, 5033, 23176, 69, 242, 68, 13, 8, 221, 22, 38, 3042, 9392, 2775, 26, 109, 2934, 800, 3726, 3726, 31, 589, 749, 20, 27448, 109, 11295, 19, 51, 13, 11193, 579, 4725, 29, 34, 2697...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Map numeric input values with text on y-axis in jqplot === i am using jqplot for showing graphs which will show digital as well as binary values. i am using dateAxisRenderer for the x-axis. data to display is in the form of [timestamp, value]. now for analog graph, its working properly, but for binary i have to show ON and OFF instead of 0 and 1 on the y-axis. i am using ticks for this behavior and converting values to form [0, 'OFF'] , [1. 'ON'] to show the labels on y-axis. The graph shows the labels correctly after this but the values are not shown plotted. Is there any way to convert the data to display i.e. the 'value' so that the values on y-axis are mapped with the required data to display ? thanks for the answers.
0
[ 2, 2942, 15764, 596, 6367, 4070, 29, 1854, 27, 13, 93, 8, 19676, 19, 487, 1251, 13221, 38, 800, 3726, 3726, 31, 589, 568, 487, 1251, 13221, 38, 26, 3187, 7210, 18, 56, 129, 298, 1888, 28, 134, 28, 14171, 4070, 9, 31, 589, 568, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
pass an object create in a class to another class === I have a class named StatisticFrame.this class creates an ojects named `stats` inside a method.How can I pass this object created from StatisticFrame class to another class?
0
[ 2, 1477, 40, 3095, 1600, 19, 21, 718, 20, 226, 718, 800, 3726, 3726, 31, 57, 21, 718, 377, 25199, 8361, 9, 1565, 718, 9695, 40, 635, 17759, 18, 377, 13, 1, 10631, 18, 1, 572, 21, 2109, 9, 1544, 92, 31, 1477, 48, 3095, 679, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
XCode 4 - IPhone Dev - Good Debug Tutorial === I'm beginning IPhone development with XCode 4 and Objectiv-C. Since I think strong debug and IDE knowledge is required to master a language, I'm looking for good resources about the debugging process and XCode. A problem I faced recently was that, an unknownException was being thrown in a sample code and I couldn't know how to debug it, since it crashed right after jumping into my Main. I think with a better configuration, it would have been much easier to debug ! I've already found this resource : https://developer.apple.com/library/ios/navigation/ But I couldn't find something related to debug in there... Did I miss something ?
0
[ 2, 993, 9375, 268, 13, 8, 21024, 9664, 13, 8, 254, 121, 16254, 29724, 800, 3726, 3726, 31, 22, 79, 997, 21024, 522, 29, 993, 9375, 268, 17, 3095, 3757, 8, 150, 9, 179, 31, 277, 966, 121, 16254, 17, 13, 3448, 1918, 25, 1390, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
View(s) not visible on Android Jelly Bean === I'm currently developing an application with which a schedule can be retrieved and viewed. To display the schedule I used the TimeRulerView (and BlocksLayout and BlockView) java source files from the Google IO 2011 app because I liked the look and feel. Source code can be found here: https://github.com/underhilllabs/iosched2011 . (Google replaced there one with the code of IO2012). Since my Galaxy Nexus updated tot Jelly Bean (4.1.1) yesterday the TimeRulerView (and/or one of the others) doesn't get shown anymore. The weird thing is that they are actually still there, but there not visible. I can see a scrollbar of the length the timeruler normally has. Also when I normally click on an block in the view I get a little pop-up, and this still happens when not seeing the timeruler or a block. I tested the original IO2011 app on my JB GN but nothing is visible there either, so the problem lies within (one of) the view(s) or the way JellyBean is rendering the view(s) (project butter maybe?). See here ( https://dl.dropbox.com/u/7102660/TimeRulerView_JellyBean_problem.zip ) for screenshots on ICS (app working), JB (app not working) and the GoogleIO2011 app.
0
[ 2, 1418, 5, 18, 6, 52, 4560, 27, 13005, 18749, 15322, 800, 3726, 3726, 31, 22, 79, 871, 3561, 40, 3010, 29, 56, 21, 4345, 92, 44, 3685, 17, 6084, 9, 20, 3042, 14, 4345, 31, 147, 14, 85, 1820, 1252, 4725, 13, 5, 290, 5198, 44...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how do variables work in Javascript? Can variable Value change during setTimeout? === I have the following code: function Notification(type) { switch (type) { case "success": notificationID="not1"; break; case "error": notificationID="not2"; break; } setNotificationTimeoutId = setTimeout(function () { jQuery('#' + notificationID).fadeOut(200, function () { var notification = document.getElementById(notificationID); if (notification) { jQuery(notification.parentNode).remove(); if (type == "success") DoSomething(); } setNotificationTimeoutId = null; }); }, 5000); } My question is, if the function(Notification) gets called on a click event, and if it gets called two times(first with Notification("success") then with Notification("error")) by two click events, is it possible that the second function call changes the type variables value for the first function call? For example: when the first call(one with success) enters the function inside the setTimeout(a second call to Notification already been made with type = "error") it sees the variable 'type' as "error" even though this call was the first and it wass called with type = "success"?
0
[ 2, 184, 107, 12157, 170, 19, 8247, 8741, 60, 92, 7612, 1923, 753, 112, 309, 891, 1320, 60, 800, 3726, 3726, 31, 57, 14, 249, 1797, 45, 1990, 52, 4634, 5, 4474, 6, 13, 1, 5521, 13, 5, 4474, 6, 13, 1, 610, 13, 7, 29245, 7, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Add external file to $_FILES array with javascript/jquery === I have the following case: I have a third party plugin in my expression engine site that handles my user registrations. It also handles profile picture uploads (which is part of the registration process). I want to add a feature for grabbing the user profile picture from Facebook during registration. As I don't want to tinker with the third party plugin, I'm looking for a way to solve this on the client side by sending the profile pic from Facebook directly into the php `$_FILES` array when the registration form is submitted (so the third party plugin can pick it up from there). Is there anyway to do this?
0
[ 2, 3547, 4886, 3893, 20, 5579, 1, 16877, 18, 7718, 29, 8247, 8741, 118, 728, 8190, 93, 800, 3726, 3726, 31, 57, 14, 249, 610, 45, 31, 57, 21, 422, 346, 10922, 108, 19, 51, 1803, 1406, 689, 30, 3053, 18, 51, 4155, 8587, 18, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to run evaluating expression in MySQL and update column accordingly? === I have the following tables: tweets stocks ------------------------------------- ----------------------------- id stock_id nyse_date class quality stock_id _date return ------------------------------------- ----------------------------- 1 1 2011-03-12 3 1 2011-03-12 0.44 2 1 2011-03-12 1 1 2011-03-15 0.17 3 1 2011-03-15 2 2 2011-03-15 -0.03 4 2 2011-03-15 2 5 2 2011-03-16 1 I need to evaluate the following expression and fill in the result in the `quality` column by using solely SQL: IF (class_value of tweet/return on that day) > 0 THEN quality = 1 ELSE 0 With class_value being: IF class = 1 THEN class_value = 0 IF class = 2 THEN class_value = 1 IF class = 3 THEN class_value = -1 For each tweet, I need to (obviously) take the stock return of that date. During the weekend, for exapmple at `2011-03-16`, there is no stock data available. In that case, `quality` should default to 0 as well (and not return an error). So let's do this manually for the 4 tweets in the example: id class class_value return class_value/return quality ----------------------------------------------------------- 1 3 -1 0.44 -1/0.44 = -2.27 0 2 1 0 0.44 0/0.44 = 0 0 3 2 1 0.17 1/0.17 = 5.88 1 4 2 1 -0.03 1/-0.03 = -33.33 0 5 1 0 n/a 0 So the end result of the query then would be an updated `tweets` table: tweets ------------------------------------- id stock_id nyse_date class quality ------------------------------------- 1 1 2011-03-12 3 0 2 1 2011-03-12 1 0 3 1 2011-03-15 2 1 4 2 2011-03-15 2 0 5 2 2011-03-16 1 0 I don't know how to put all this into a query. I now have this, but it only selects the class and return but doesn't set `class_value` or implement the expression. UPDATE tweets SET quality = ( SELECT t.class, s.return FROM tweets t LEFT JOIN stocks s ON t.nyse_date = s._date ) Any help is greatly appreciated :-)
0
[ 2, 184, 20, 485, 26764, 1803, 19, 51, 18, 22402, 17, 11100, 4698, 12932, 60, 800, 3726, 3726, 31, 57, 14, 249, 7484, 45, 20224, 18, 2070, 18, 13, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to define basic geometric operations on NSPoint? === NSPoint is a C-struct used in Cocoa to represent a point in the plane. How do you translate, rotate, and do other geometric operations on NSPoint in an Objective-C style ? So far, I'm using C functions to make these calculations, but in my opinion it doesn't look good with the rest of the code. -(NSPoint) rotateAroundNSPoint: (NSPoint)origin pointToRotate:(NSPoint)point andDegreesAngle:(float)angleD; NSPoint rotateAround(NSPoint origin, NSPoint initialPos, float angleDegrees) /* C-style function */ NSPoint pointD = rotateAround(point000, point001, 72*9); /* Objective-C method */ NSPoint pointE = [self rotateAroundNSPoint:point000 pointToRotate:point001 andDegreesAngle:72*12]; Are there other alternatives ?
0
[ 2, 184, 20, 9267, 2125, 13958, 1311, 27, 13, 2172, 3132, 60, 800, 3726, 3726, 13, 2172, 3132, 25, 21, 272, 8, 10346, 147, 19, 24507, 20, 3501, 21, 454, 19, 14, 3627, 9, 184, 107, 42, 20628, 15, 21448, 15, 17, 107, 89, 13958, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How get exact number of online users in php chat system? === I made a chat system using php and ajax. When a user login to this chat system 'is_online' status in table updated to 1.I am using this field to list current online members. I have to update this status to 0 if the user close the all tabs of my website without logout. How can do it?
0
[ 2, 184, 164, 5340, 234, 16, 2087, 3878, 19, 13, 26120, 6615, 329, 60, 800, 3726, 3726, 31, 117, 21, 6615, 329, 568, 13, 26120, 17, 20624, 9, 76, 21, 4155, 6738, 108, 20, 48, 6615, 329, 13, 22, 403, 1, 218, 1143, 22, 1782, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
replaceWith & fadeIn/fadeOut - hover not working afterwards === I have a task here that requires heavy DOM manipulation. Because this can have a bad impact on the performance, I clone the element, make the changes there and replace the clone with the original. After replacement, the elements have a hover function. Because I want faded transition, I do the change like this: myElement.fadeOut(500, function(){ myClone.hide(); myElement.replaceWith(myClone); myClone.fadeIn(500); }); This is working, but after that the hover functionality does not work anymore. When I remove the callback from `fadeOut`, I can hover again but the timed transitions does not look good anymore. *What can I do about it? Why do the elements lose their hover-functionality when using the callback?*
0
[ 2, 3934, 1410, 279, 11381, 108, 118, 1473, 546, 1320, 13, 8, 21350, 52, 638, 4601, 800, 3726, 3726, 31, 57, 21, 3005, 235, 30, 4781, 1278, 11859, 17561, 9, 185, 48, 92, 57, 21, 896, 2261, 27, 14, 956, 15, 31, 13871, 14, 4520, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get value of item from some elements before with condition === I have such XML <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="do.xsl"?> <catalog> <cd> <title_>Empire Burlesque</title_> <artist>Bobby</artist> <company>Columbia</company> </cd> <cd> <title_>Shirt2</title_> <artist>Bobby</artist> <company>Columbia2</company> </cd> <cd> <title_>Fingers</title_> <artist>Bobby</artist> <company>Columbia3</company> </cd> <cd> <title_>Zip1</title_> <artist>Bobby</artist> <company>---</company> </cd> <cd> <title_>Zip2</title_> <artist>Bobby</artist> <company>---</company> </cd> </catalog> I need to replace --- with previous meaningful data - Columbia3 I do next <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="4.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Title</th> <th>Artist</th> </tr> <xsl:for-each select="catalog/cd"> <tr> <td><xsl:value-of select="title_"/></td> <td><xsl:value-of select="artist"/></td> <td> <xsl:variable name="NotStarted" select="preceding-sibling::cd[1]/company" /> <xsl:choose> <xsl:when test="company != '---'"> <xsl:value-of select="company"/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$NotStarted" /> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> As expected i got next html Title Artist Empire Burlesque Bobby Columbia Shirt2 Bobby Columbia2 Fingers Bobby Columbia3 Zip1 Bobby Columbia3 Zip2 Bobby --- How i can iterate back to get last meaningful string to replace with or any other way? Thanks.
0
[ 2, 164, 1923, 16, 9101, 37, 109, 2065, 115, 29, 2874, 800, 3726, 3726, 31, 57, 145, 23504, 13, 1, 60, 396, 8184, 615, 3726, 7, 165, 9, 387, 7, 19608, 3726, 7, 1982, 410, 8, 457, 7, 60, 1, 13, 1, 60, 396, 8184, 8, 4381, 176...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do URL shorteners guarantee unique URLs when they don't expire? === There are a lot of questions here on stackoverflow regarding URL shorteners as well as elsewhere on the internet, e.g. http://stackoverflow.com/questions/742013/how-to-code-a-url-shortener http://stackoverflow.com/questions/3489377/how-do-url-shortener-calculate-the-url-key-how-do-they-work?lq=1 http://www.codinghorror.com/blog/2007/08/url-shortening-hashes-in-practice.html However, there is one thing I don't understand. For instance, http://goo.gl uses four characters at the moment. However, they claim their short URLs don't expire. As mentioned in the article on coding horror, if they can't recycle URLs, the only possible solution is at one point to add an additional character. Ok, so far so good. With 4 characters that means about 1.5 million unique addresses. For something like Google Maps, I don't think that is very much and if you can't recycle, my guess is they run out of available addresses fairly quickly. Now for the part I don't get. While handing out addresses, they start to run out of unused addresses. They have to check if a newly generated address has not been issued yet. The chance this has happened and the address is already in use increases. The straightforward solution of course is to generate a new URL over and over again until they find a free one or until they have generated all 1.5 million alternatives. However, this surely can't be how they actually do it, because this would be far too time-consuming. So how do they manage this? Also, there are probably several visitors at once asking for a short URL, so they must have some synchronization going on as well. But how should the situation be managed when the fifth character needs to be added? Finally, when doing some research on how the URLs from http://goo.gl work, of course I requested a short URL for a map on Google Maps several times. None of them will ever be used. However, when Google would strictly enforce the policy of URLs not expiring once issued, this means that there are lots and lots of dormant URLs in the system. Again, I assume Google (and the other services as well) have come up with a solution to this problem as well. I could imagine a clean up service which recycle URLs which have not been visited in the first 48 hours after creation or less then 10 times in the first week. I hope someone can shed some light on this issue as well. In short, I get the general principle of URL shorteners, but I see several problems when these URLs cannot expire. Does anyone know how the problems mentioned above might be resolved and are there any other problems?
0
[ 2, 184, 107, 287, 6362, 502, 17802, 18, 9120, 2619, 13, 911, 7532, 76, 59, 221, 22, 38, 25910, 60, 800, 3726, 3726, 80, 50, 21, 865, 16, 2346, 235, 27, 7566, 2549, 9990, 3467, 287, 6362, 502, 17802, 18, 28, 134, 28, 6040, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Entity Framework 4.3.1 Migrations - enable automatic migration and creating a new database in the same time === I have played with Entity Framework 4.3 migrations for some time now, but I have trouble achieving the next behavior: In case my code runs on an existing database, I want the database to be migrated automatically to the latest version, but in case the database doesn't exist, the database should be created automatically from the migrations. I think the problems is related to the first migration that you create. If you create the first migration using -IgnoreChanges parameter (or manually delete them as explained here: http://thedatafarm.com/blog/data-access/using-ef-migrations-with-an-existing-database/), you will not be able to use migrations in order to create a new table using the DbMigrator class. because you don't have the initial migration. If you create the first migration without using -IgnoreChanges, than the migration of the existing database will not be possible. Does anybody has any solution for this problem?
0
[ 2, 9252, 6596, 268, 9, 240, 9, 165, 8443, 18, 13, 8, 9240, 6715, 8443, 17, 2936, 21, 78, 6018, 19, 14, 205, 85, 800, 3726, 3726, 31, 57, 257, 29, 9252, 6596, 268, 9, 240, 8443, 18, 26, 109, 85, 130, 15, 47, 31, 57, 2572, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to display data from rss feed using Nodejs? === <p>Anyone please help me how to display RSS feed using Nodejs. Thanks in advance</p>
0
[ 2, 184, 20, 3042, 1054, 37, 13, 1224, 18, 4063, 568, 15421, 728, 18, 60, 800, 3726, 3726, 13, 1, 306, 1, 6001, 849, 2247, 448, 55, 184, 20, 3042, 13, 1224, 18, 4063, 568, 15421, 728, 18, 9, 3669, 19, 3612, 1, 118, 306, 1, 3,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
easy cms/framework for making a twitter site === I was reading a thread last year about cms softwares that are used for making social sites... and basically someone said it takes less time to do something with a certain cms and the response was you could make a whole twitter in seconds using so-and-so framework, that doesn't mean its best overall. I surly bookmarked that so-and-so website and were planing to test it. but its not anywhere in my bookmarks and searching in google didn't help. does anyone know what that cms/framework for creating twitter-like websites? Thanks alot.
0
[ 2, 2010, 2390, 18, 118, 8361, 3783, 26, 544, 21, 10623, 689, 800, 3726, 3726, 31, 23, 1876, 21, 9322, 236, 159, 88, 2390, 18, 2306, 18, 30, 50, 147, 26, 544, 668, 3259, 9, 9, 9, 17, 11374, 737, 87, 32, 1384, 787, 85, 20, 107...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to build a class for all the for loops in main() (Just to reduce code in the main function) === For loop iterates through the vector and show all strings on the console successfully: int main(int argc, const char * argv[]) { vector<string>stringVector; string newStringEntry; cin>>newStringEntry; stringVector.push_back(newStringEntry); cin>>newStringEntry; stringVector.push_back(newStringEntry); for (vector<string>::iterator i = stringVector.begin(); i != stringVector.end(); ++i) { cout<<*i<<endl; } } But this makes the code hard to read (said our teacher) now we have to build a class for the for loop and the main should look like this after the change: int main(int argc, const char * argv[]) { vector<string>stringVector; string newStringEntry; cin>>newStringEntry; stringVector.push_back(newStringEntry); cin>>newStringEntry; stringVector.push_back(newStringEntry); showStrings(); } The problem I see is that I cannot just copy paste the for loop to an own class because the vector name I declare in the main is not known in the class so I get an error. How can I get this working? My class so far looks like this: class VectorHelp { void showStrings() const { for (vector<string>::iterator i = vectorName.begin(); i != vectorName.end(); ++i) { cout << *i << endl; } } };
0
[ 2, 184, 20, 1895, 21, 718, 26, 65, 14, 26, 19661, 19, 407, 5, 6, 13, 5, 2759, 20, 4136, 1797, 19, 14, 407, 1990, 6, 800, 3726, 3726, 26, 5293, 32, 106, 7759, 120, 14, 7497, 17, 298, 65, 7887, 27, 14, 8650, 3673, 45, 19, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Two way lookup from key value pair === I have a set of settings in a class that I need to iterate through: A,B,C,D The end result of each iteration is a single number, what is the best way to find out from the index of the result list what the values of A,B,C and D are? e.g. `A= 2 to 10 in steps of 0.1 B= 4 to 20 in steps of 0.5 C= 5 to 50 in steps of 0.2 D= 6 to 70 in steps of 3` And the results come as indexes in a list from each iteration e.g. `Iteration[0] = 2; (A=2,B=4,C=5,D=6) Iteration[1] = 10; (A=2,B=4,C=5,D=9)` If I have the original settings what is the best way to reverse lookup the values of A,B,C,D from the index number? I also need to carry out the opposite calculation too, from a set of settings, what is the index. Any help would be great! Thanks, Chris.
0
[ 2, 81, 161, 361, 576, 37, 1246, 1923, 2146, 800, 3726, 3726, 31, 57, 21, 309, 16, 12410, 19, 21, 718, 30, 31, 376, 20, 32, 106, 1373, 120, 45, 21, 15, 220, 15, 150, 15, 43, 14, 241, 829, 16, 206, 23534, 25, 21, 345, 234, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Make the scene in Storyboard longer or scrolling in it === I'm working in the storyboard, and one of my scrollviews is way longer than the iPhone screen (to display some long text). In the simulator it's no problem to scroll but is there some way to scroll down the scrollview in the storyboard?? I have a slight memory of seeing a tutorial where the iphone screen in the storyboard was "stretched" so it looked like an iPhone with a very long screen. But that may have been in a dream. Someone who knows how to do something like this?
0
[ 2, 233, 14, 1691, 19, 609, 2806, 1045, 54, 13, 28166, 19, 32, 800, 3726, 3726, 31, 22, 79, 638, 19, 14, 609, 2806, 15, 17, 53, 16, 51, 12159, 4725, 18, 25, 161, 1045, 119, 14, 21024, 2324, 13, 5, 262, 3042, 109, 175, 1854, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JavaFX 2.1 Label clipped in a Scroll Pane === I have a Label element (with the property wrapText = true) placed in a scroll pane, but when I resize the window, the labels also resize and they become clipped. How could I specify a minheight (dynamically) or some property for the labels, such as when the scroll pane becomes resized, they will maintain height, permitting the pane to scroll? Thank you.
0
[ 2, 8247, 16488, 172, 9, 165, 1899, 22505, 19, 21, 12159, 13, 16660, 800, 3726, 3726, 31, 57, 21, 1899, 4520, 13, 5, 1410, 14, 1354, 8118, 11969, 800, 1151, 6, 1037, 19, 21, 12159, 13, 16660, 15, 47, 76, 31, 302, 10454, 14, 1463,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
cryptography in windows mobile application === I'm doing windows mobile wireless application using visual studio .net(c#). So I want to add encryption for remote login over TCP connection(using c#). So are there any way to add cryptographic functionalities in our mobile application? or are there any libraries for windows mobile applications?
0
[ 2, 16277, 15438, 19, 1936, 3241, 3010, 800, 3726, 3726, 31, 22, 79, 845, 1936, 3241, 10149, 3010, 568, 3458, 1120, 13, 9, 2328, 5, 150, 5910, 6, 9, 86, 31, 259, 20, 3547, 24420, 26, 5388, 6738, 108, 84, 13, 38, 7439, 2760, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use UIPickerView to populate different textfields in one view? === I have a view with 8 textfields. I want each textfield to be associated with a pickerview which will have different items. This pickerview should populate each text field. When I click on the textfield it should show the pickerview and the items associated with it and when I select the item for that textfield it should dismiss the pickerview. Then again when I click on next textfield it should show the pickerview with the items for that text field and so on... Is it possible to do so? I am new to xcode. Any help is much appreciated. Thank you.
0
[ 2, 184, 20, 275, 13, 5661, 16855, 106, 4725, 20, 1675, 12383, 421, 1854, 1109, 18, 19, 53, 1418, 60, 800, 3726, 3726, 31, 57, 21, 1418, 29, 469, 1854, 1109, 18, 9, 31, 259, 206, 1854, 1109, 20, 44, 1598, 29, 21, 2036, 106, 472...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Loading html5 pages which use javascript into a webview for a native iOS App === Was wondering if anyone knew how to load html5 pages which use javascript into a webview in XCode. I keep getting errors and the main one is `warning: no rule to process file '$(PROJECT_DIR)/donk/javascript/highlight.pack.js' of type sourcecode.javascript for architecture i386` I have seen apps that can do this. Can someone please let me know how to do this? Would be forever greatful. Cheers!
0
[ 2, 12797, 13, 15895, 264, 4434, 56, 275, 8247, 8741, 77, 21, 2741, 4725, 26, 21, 1275, 13, 7760, 4865, 800, 3726, 3726, 23, 5712, 100, 1276, 404, 184, 20, 6305, 13, 15895, 264, 4434, 56, 275, 8247, 8741, 77, 21, 2741, 4725, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MySQL JOIN multiple rows of one table to one row of other table === I have two tables: Table 1: Articles (id, name, title, content) Table 2: Comments (id, comment, a_id) Table 2 contains comments with a_id corresponding with the id field in Table 1, and has several rows for the same article I used the following select statement: $result = mysql_select("SELECT * FROM articles a JOIN comments c ON a.id = c.a_id WHERE a.name='$a'"); $row = mysql_fetch_array($result); echo $row["title"]."<br/>".$row["content"]."<hr/>".$row["comments"] Security issues aside, this shows the contents for the given article name $a, but gives only one comment when there should be multiple ones. What must I do to get all comments for the given article to show up? And shouldn't $row["comments"] be an array?
0
[ 2, 51, 18, 22402, 1865, 1886, 11295, 16, 53, 859, 20, 53, 3131, 16, 89, 859, 800, 3726, 3726, 31, 57, 81, 7484, 45, 859, 6352, 3376, 13, 5, 1340, 15, 204, 15, 581, 15, 2331, 6, 859, 4274, 7534, 13, 5, 1340, 15, 6484, 15, 21,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ShareKit SSO facebook promptAuthorization returns to deferent viewController iOS 5 === So I have everything set up with ShareKit to use Facebook with it and I'm using promptAuthorization to auth ahead of time. I am using storyboard to do all of my interface building and it's been great until I started adding the SSO integration for facebook. Everything works exactly as expected except that when FB returns to the app it returns to a different view/controller. The ONLY time that I present that view manually in the app is inside of a block that isn't called unless a different button is pressed and even then not until it returns from a ASIHTTPRequest call... so any ideas?
0
[ 2, 1891, 13703, 13, 18, 656, 9090, 11443, 4417, 10007, 1829, 4815, 20, 121, 2407, 2291, 1418, 12898, 1252, 13, 7760, 331, 800, 3726, 3726, 86, 31, 57, 796, 309, 71, 29, 1891, 13703, 20, 275, 9090, 29, 32, 17, 31, 22, 79, 568, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how do i use SQL value as paramtre function inside SQL query? === if i have a function inside an SQL query, for example if i have comments and i want verify inside the SQL if that comment have a minimum character to show in list, $bdd->query('SELECT id, comment FROM comments WHERE count > '. count_chars("id").' ORDER BY time'); so the problem is how can i use the id as parameter for this fonction ? thanks.
0
[ 2, 184, 107, 31, 275, 4444, 255, 1923, 28, 2258, 79, 38, 99, 1990, 572, 4444, 255, 25597, 60, 800, 3726, 3726, 100, 31, 57, 21, 1990, 572, 40, 4444, 255, 25597, 15, 26, 823, 100, 31, 57, 7534, 17, 31, 259, 21012, 572, 14, 4444...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pdf sharp font style Bold,Italic and Underline together === Have any way set font style ItalicUnderline or BoldItalicUnderline? ![enter image description here][1] [1]: http://i.stack.imgur.com/6fzjZ.png Thanks
0
[ 2, 13, 11124, 2641, 9978, 1034, 5657, 15, 3188, 4663, 17, 131, 1143, 429, 800, 3726, 3726, 57, 186, 161, 309, 9978, 1034, 32, 192, 596, 4579, 1143, 54, 5657, 3188, 4663, 4579, 1143, 60, 13, 187, 2558, 13679, 1961, 5318, 235, 500, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WCF - The client and > service bindings may be mismatched === Error: > Content Type multipart/related; > type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:ba0ec7a3-1707-44b9-be72-2fe11d4dfe2b+id=4";start-info="text/xml" > was not supported by service > `http://ServerName/FolderName/ServiceName.svc.` The client and > service bindings may be mismatched. Client Config : <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:1371/Service.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService" contract="Service.IService" name="BasicHttpBinding_IService" /> </client> </system.serviceModel> </configuration> Server Config : <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Mtom" textEncoding="utf-8" transferMode="Streamed" useDefaultWebProxy="true"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings>
0
[ 2, 11801, 410, 13, 8, 14, 6819, 17, 13, 1, 365, 8728, 18, 123, 44, 2462, 12280, 69, 800, 3726, 3726, 7019, 45, 13, 1, 2331, 1001, 1889, 3091, 118, 6203, 73, 13, 1, 1001, 3726, 7, 2552, 20669, 118, 396, 2594, 2430, 396, 8184, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unregister COM component in WIX during rollback, is it necessary? === I am creating a WIX installer project. Part of the work in the installation is to register some COM component. I have (hopefully) succeeded with that by using heat.exe to generate the COM component declaration, although I needed to modify a little after the wxs files were generated. To make it clear, I am pasting my COM component declaration here: <ComponentGroup Id="COMComponent" Directory="INSTALLDIR"> <Component Id="COMDll" Guid="MY_GUID1"> <Class Id="{MY_CLASSID1}" Context="InprocServer32" Description="DESCRIPTION1" ThreadingModel="both" ForeignServer="mscoree.dll"> <ProgId Id="MYID1" Description="DESCRIPTION1" /> </Class> ... <File Id="FILE_ID_1" KeyPath="yes" Source="MY_COM.dll" /> <File Id="FILD_ID2" KeyPath="no" Source="MY_COM.tlb"> <TypeLib Id="{xxx}" Description="xxx" HelpDirectory="INSTALLDIR" Language="0" MajorVersion="525" MinorVersion="0"> <Interface Id="{xxx}" Name="xxx" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" /> ... </TypeLib> </File> <ProgId Id="Record" /> <RegistryValue Root="HKCR" Key="CLSID\{xxx}\Implemented Categories\{xxx}" Value="" Type="string" Action="write" /> <RegistryValue Root="HKCR" Key="CLSID\{xxx}\InprocServer32\525.0.4573.25681" Name="Class" Value=" MYID1" Type="string" Action="write" /> ... </Component> </ComponentGroup> I replaced some IDs with xxx, so they are not a problem. If there is anything else wrong, please inform me. Now my question is: do I need to explicitly specify to uninstall the COM component in the rollback phase? Because I have experienced some problem, that after some failure installation, the further tries of installations wouldn't go through and some "ActiveX object can't be created" error popped up. I suspected it is because COM component was not unregistered successfully in the previous fail installation. But I am not sure. In fact I have limited knowledge in COM interop, so I am not sure what's necessary for install/uninstall them. Any help would be appreciated. Thanks!
0
[ 2, 367, 12463, 9959, 13, 960, 5912, 19, 4807, 396, 112, 3001, 1958, 15, 25, 32, 2378, 60, 800, 3726, 3726, 31, 589, 2936, 21, 4807, 396, 16146, 106, 669, 9, 141, 16, 14, 170, 19, 14, 7758, 25, 20, 2243, 109, 13, 960, 5912, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which is Faster List<string>.forech or listString.GetEnumerator() === I have writen following code to print the item values inside the list. Now I want to measure which one is faster as going forward I will have huge list to deal with. So how do I calculate the processing time? Is manually creating a bulky List<string> is the only option? public void printMedod(string strPrintListVal) { Console.WriteLine(strPrintListVal); } static void Main(string[] args) { Program p1 = new Program(); List<string> listString = new List<string> { "Rox","Stephens","Manahat","Lexus",":)"}; listString.ForEach(p1.printMedod); Console.ReadKey(); } I can also do the same thing using GetEnumerator: static void Main(string[] args) { List<string> listString = new List<string> { "Rox","Stephens","Manahat","Lexus",":)"}; var enumerator = listString.GetEnumerator(); while (enumerator.MoveNext()) { var pair = enumerator.Current; Console.WriteLine(pair); } Console.ReadKey(); }
0
[ 2, 56, 25, 4233, 968, 1, 11130, 1, 9, 1106, 7455, 54, 968, 11130, 9, 3060, 219, 723, 106, 3457, 5, 6, 800, 3726, 3726, 31, 57, 2757, 103, 249, 1797, 20, 4793, 14, 9101, 4070, 572, 14, 968, 9, 130, 31, 259, 20, 4058, 56, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the important memory allocation flaw that is seen here? === Actually this was a homework I got. But I do not know the answer. Can anyone please help me? What is the important memory allocation flaw that is seen in the following C++ code? How can you avoid it? void testFunction(){ int * p = new int(5); cout << p << *p << &p << endl; }
1
[ 2, 98, 25, 14, 681, 1912, 16840, 398, 2371, 30, 25, 541, 235, 60, 800, 3726, 3726, 1121, 48, 23, 21, 22334, 31, 330, 9, 47, 31, 107, 52, 143, 14, 1623, 9, 92, 1276, 2247, 448, 55, 60, 98, 25, 14, 681, 1912, 16840, 398, 2371,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why doesn't Java complain about generic map casting? === Object stringMap = new HashMap<String, String>(){{ put("1", "a"); }}; Map<Integer, String> integerMap = (Map<Integer, String>)stringMap; // Why doesn't Java throw an exception at run-time? // I know this is not a problem if stringMap is declared as Map<String, String>. // However, the actual code above was using Spring Bean. // Map<Integer, String> integerMap = (Map<Integer, String>)context.getBean("map"); System.out.println(integerMap.get(1)); // prints null System.out.println(integerMap.get("1")); // prints a Q1. Why Java allows such casting at run-time? Q2. If using bean, what is the best practice to avoid this error?
0
[ 2, 483, 1437, 22, 38, 8247, 15310, 88, 12733, 2942, 9087, 60, 800, 3726, 3726, 3095, 3724, 15022, 800, 78, 19170, 15022, 1, 11130, 15, 3724, 1, 5, 6, 1, 442, 5, 7, 165, 7, 15, 13, 7, 58, 7, 6, 73, 13, 1, 73, 2942, 1, 6391,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dependency Injection in GWT or of Spring === I am new GWT. I have a project where I am using GWT and Spring as our technologies to implement. I have done Spring integration with GWT, with the help of following links. http://technophiliac.wordpress.com/2008/08/24/giving-gwt-a-spring-in-its-step/ https://docs.google.com/document/pub?id=1USHYx9cB3B1s1zM4dlkzEZ759D3lEfavn_dDewvBkaA Here with this, I am able to apply the Dependency Injection with only Server side classes which holds the actual business(Remote Service) functionality. <b>My questions are, </b> - How can i apply Dependency Injection for all other classes like those are in client, shared, view, presenter packages? - Which dependency Injection is better? I mean GWT provided two dependency injection mechanisms 1. guice is for implementing dependency injection on server side 1. gin is for implementing dependency injection on client side. 1. and Spring Dependency Injection. Which one is better to select? either GWT Dependency Injection or Spring Dependency Injection? or combination of both? Please reply me. Thanks, Saritha.
0
[ 2, 26835, 13646, 19, 14094, 38, 54, 16, 1573, 800, 3726, 3726, 31, 589, 78, 14094, 38, 9, 31, 57, 21, 669, 113, 31, 589, 568, 14094, 38, 17, 1573, 28, 318, 5740, 20, 8713, 9, 31, 57, 677, 1573, 8078, 29, 14094, 38, 15, 29, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Data erased from Sqlite db when moving from page to another === I use phonegap to build applications for Android & IOS. I store my database using sqlite. I have a main javascript file in which the initialization of the DB & the main functions are written, then at the other pages I put the database functions related to that page. The problem is that when I make some operations on the DB from another page then move to the next page & retrieve the data, I find that all what I made before was erased and it just brings the data from the main javascript file. I'm wondering how can I let the data be saved & prevent it from being deleted whenever I move from one page to another. The main javascript file that I use at all the pages contains this for the db initialization: function populateDB(tx) { tx.executeSql('DROP TABLE IF EXISTS Table'); } Is this the problem ? Should I stop the table from being dropped every time I use the db. But If I removed it, what should I make at the very first time while creating the DB ?
0
[ 2, 1054, 25513, 37, 4444, 10601, 13, 9007, 76, 1219, 37, 2478, 20, 226, 800, 3726, 3726, 31, 275, 1132, 1136, 306, 20, 1895, 3767, 26, 13005, 279, 13, 7760, 9, 31, 1718, 51, 6018, 568, 4444, 10601, 9, 31, 57, 21, 407, 8247, 8741...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Proper way to know whether an Activity has been destroyed === May I know what is the proper way to know whether an Activity has been destroyed? Currently, I am using the following way. private volatile boolean isOnDestroyCalled = false; @Override protected void onDestroy() { super.onDestroy(); isOnDestroyCalled = true; } public boolean isOnDestroyCalled() { return this.isOnDestroyCalled; } Is there any other way better than the above?
0
[ 2, 4119, 161, 20, 143, 1472, 40, 2358, 63, 74, 2183, 800, 3726, 3726, 123, 31, 143, 98, 25, 14, 4119, 161, 20, 143, 1472, 40, 2358, 63, 74, 2183, 60, 871, 15, 31, 589, 568, 14, 249, 161, 9, 932, 24208, 9827, 413, 210, 25, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Change the Selection Color of a WinForms ComboBox === All, I have had an indepth look but can't seem to find what I am looking for. I want ot change the selection color of a ComboBoc control (ideally without having to sub-class the control). I though doing the following would work, but this event is not even firing private void comboBoxDb_DrawItem(object sender, DrawItemEventArgs e) { ComboBox combo = sender as ComboBox; e.Graphics.FillRectangle(new SolidBrush(combo.BackColor), e.Bounds); string strSelectionColor = @"#99D4FC"; Color selectionColor = System.Drawing.ColorTranslator.FromHtml(strSelectionColor); e.Graphics.DrawString(combo.Items[e.Index].ToString(), e.Font, new SolidBrush(selectionColor), new Point(e.Bounds.X, e.Bounds.Y)); } but this event is not even firing. What am I doing wrong here? Thanks for your time.
0
[ 2, 753, 14, 3155, 1665, 16, 21, 628, 4190, 18, 22621, 5309, 800, 3726, 3726, 65, 15, 31, 57, 41, 40, 19, 22969, 361, 47, 92, 22, 38, 2260, 20, 477, 98, 31, 589, 699, 26, 9, 31, 259, 13, 2779, 753, 14, 3155, 1665, 16, 21, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Learning path from Java Client apps to Windows 8 Metro and Desktop apps === I was developing desktop and rich-client Java Swing apps for last 6 years. After watching Windows 8 presentations from BUILD I started to learn Metro style apps development using C# and XAML. I see that without knowing .NET, XAML and WPF I don't understand Metro code samples. In many places I saw that if a developer has prior knowledge in .NET technologies they are mostly transferable to WinRT style apps. But I don't know them, so probably I should first read some books to learn .NET, C#, WPF, XAML and then I can read a book about developing Metro WinRT apps? Or there is a good book that explains all the technologies all together? For example: 1. .NET, C# 2. WPF, XAML 3. WinRT and Metro So please advise the learning path and concrete books/guides? P.S. I think desktop apps on Windows 8 is also interesting theme. Thanks.
4
[ 2, 2477, 2013, 37, 8247, 6819, 4865, 18, 20, 1936, 469, 3986, 17, 17404, 4865, 18, 800, 3726, 3726, 31, 23, 3561, 17404, 17, 2042, 8, 150, 18513, 38, 8247, 5587, 4865, 18, 26, 236, 400, 122, 9, 75, 1953, 1936, 469, 6364, 18, 37,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Shredding xml into table with groups with t-sql === I have the following xml doc <Root> <Translation> <Entry language ="ES" text = "Alsace"/> <Entry language ="DE" text = "Elsass"/> <Entry language ="EN" text = "Alsace"/> </Translation> <Translation> <Entry language ="ES" text = "Brittany"/> <Entry language ="DE" text = "Bretagne"/> <Entry language ="EN" text = "Brittany"/> </Translation> <Root/> I need it shredded into a table whilst preserving the groups. So because the translation element lacks any id attribute the grouping is implicit in the structure. The table result should look like. translation_id, lanuage, text --------------------------------- 1,ES, Alsace 1,DE, Elsass 1,EN, Alsace 2,ES , Brittany 2,DE, Bretagne 2,EN Brittany I have tried various thing like select newid(), ( select rows.n.value('(@language)[1]', 'nvarchar(max)') from @p.nodes('/Translation/Entry') rows(n) ) from @p.nodes('/Translation') rows(n) but cant seem to get the grouping ID in without using some kind of loop. Thanks
0
[ 2, 21045, 3258, 23504, 77, 859, 29, 1170, 29, 13, 38, 8, 18, 22402, 800, 3726, 3726, 31, 57, 14, 249, 23504, 9765, 13, 1, 14032, 1, 13, 1, 27455, 1, 13, 1, 18195, 816, 800, 7, 160, 7, 1854, 800, 13, 7, 192, 18, 6174, 7, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to enable error reporting when running a rails app in production mode? === I am working in a rails app. I can able to see the below screen in my production server whenever there is an error. How do i enable error reporting in my server to see the actual error? Do i have to do any config change in Rails app or enable error reporting in my server. ![enter image description here][1] [1]: http://i.stack.imgur.com/NggHh.png **Note : My server is Ngnix.**
0
[ 2, 184, 20, 9240, 7019, 6670, 76, 946, 21, 2240, 18, 4865, 19, 637, 3740, 60, 800, 3726, 3726, 31, 589, 638, 19, 21, 2240, 18, 4865, 9, 31, 92, 777, 20, 196, 14, 1021, 2324, 19, 51, 637, 8128, 6634, 80, 25, 40, 7019, 9, 184,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dynamic url of first test case to become output for second test case in selenium IDE === I am using selenium IDE I have created a pension plan with name which is mandatory field in creating pensionplan .Name of pension plan = regexp(test%) when i run it more than 1 time ,it created two pension plan with name reg:test%(which is weird) Now my problem is : Once pension plan is created it generate oid number(which is different every time and different for each pension plan). /la_pension_plan/jsp/pension_plans/pension_plan.jsp?oid=443736&url=/jsp/pension_plans/pension_plans.jsp". Expected: As soon as i create a new pension plan i want script to automatically store the oid number in my first test case then in my second test case i want to use same above url with oid number provided by script. Please reply....
0
[ 2, 7782, 287, 6362, 16, 64, 1289, 610, 20, 533, 5196, 26, 153, 1289, 610, 19, 23027, 14311, 13, 3448, 800, 3726, 3726, 31, 589, 568, 23027, 14311, 13, 3448, 31, 57, 679, 21, 8698, 944, 29, 204, 56, 25, 12605, 575, 19, 2936, 8698...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
S3 Multiple download in android crashes eclipse Eclipse Java EE IDE for Web Developers, version Juno === I am trying to download multiple items from a bucket within an android application, but when i run the code eclipse freezes and some time later shuts down completely. My code looks like this : private Button baslaButton = null; AWSCredentials myCredentials = new BasicAWSCredentials(accessKey, secretKey); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.expandable_list_content); //this.setContentView(R.layout.simple_gallery_item); baslaButton = (Button)this.findViewById(R.id.button1); baslaButton.setOnClickListener(new View.OnClickListener() { public void onClick (View v){ downloadFromS3(); } }); } public void downloadFromS3() { try{ TransferManager tm = new TransferManager(myCredentials); tm.getAmazonS3Client(); tm.downloadDirectory("cerceve", "00000001/Album 1/", destinationDirectory); tm.shutdownNow(); } catch(Exception e) { System.err.flush(); } finally { try { Thread.sleep(5000); } catch(InterruptedException ie){} } } } Now What am i doing wrong? or is it completely wrong??
0
[ 2, 13, 18, 240, 1886, 7121, 19, 13005, 21563, 11652, 11652, 8247, 13, 2851, 13, 3448, 26, 2741, 10168, 15, 615, 21715, 800, 3726, 3726, 31, 589, 749, 20, 7121, 1886, 3755, 37, 21, 12433, 363, 40, 13005, 3010, 15, 47, 76, 31, 485, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to click a link or button with random IDs? === How can I ckick the button or link with a random ID? Have this button or link a number? For Example: **@b.link(:number => "1").click** or **@b.button(:number => "1").click** Anyone idea?
0
[ 2, 184, 20, 10840, 21, 3508, 54, 5167, 29, 5477, 13, 9178, 60, 800, 3726, 3726, 184, 92, 31, 272, 16098, 14, 5167, 54, 3508, 29, 21, 5477, 4924, 60, 57, 48, 5167, 54, 3508, 21, 234, 60, 26, 823, 45, 13, 1409, 1, 220, 9, 6258...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java Web service to Sharepoint Query === I am querying a list on sharepoint via java via a webservice. It works fine when I want to get the whole list, but I want to query only part of the list. It can be done via a CAML query like this: <Query> <Where> <Gt> <FieldRef Name='ID' /> <Value Type='Number'>10</Value> </Gt> </Where> </Query> I'm not sure how to pass this via Java though.. Now I'm doing this: GetListItemsResponse.GetListItemsResult result = port.getListItems(listName, viewName, query, viewFields, rowLimit, queryOptions, webID); Where QUERY object is simply null (which fetches the whole list). I read somewhere it can be done like this: GetListItems.Query query = new GetListItems.Query(); query.getContent().add(generateXmlNode(QueryStringHere)); But I don't have the generateXmlNode method. Any ideas?
0
[ 2, 8247, 2741, 365, 20, 1891, 3132, 25597, 800, 3726, 3726, 31, 589, 25597, 68, 21, 968, 27, 1891, 3132, 1197, 8247, 1197, 21, 2741, 11449, 9, 32, 693, 1123, 76, 31, 259, 20, 164, 14, 979, 968, 15, 47, 31, 259, 20, 25597, 104, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Finding a char from an array, spliting at that point and then inserting another char after === I am basically looking for a way to check if a certain string contains any of a certain list of chars, and if contains one of these to split the string and then insert the same char infront/after it. This is because these certain chars are breaking my search when they are input due to SQL not handling them well. This is how far I have actually got so far: string[] errorChars = new string[] { "!", "}", "{", "'", }; for (int i = 0; i < errorChars.Count(); i++) { if(fTextSearch.Contains(errorChars[i])) { } }
0
[ 2, 3007, 21, 4892, 37, 40, 7718, 15, 2132, 68, 35, 30, 454, 17, 94, 14692, 68, 226, 4892, 75, 800, 3726, 3726, 31, 589, 11374, 699, 26, 21, 161, 20, 2631, 100, 21, 1200, 3724, 1588, 186, 16, 21, 1200, 968, 16, 4892, 18, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Visual Studio 2010 Unit test always gives "Object reference not set to an instance of an object" === I am currently writing a unit test for class methods but accessor always throwing exception. Consider the following test method: /// <summary> ///A test for AddGateway ///</summary> [TestMethod()] [DeploymentItem("SmartGatewayUABL.dll")] public void AddGatewayTest1() { GatewaySettingsViewModel_Accessor target = new GatewaySettingsViewModel_Accessor(); target.GatewayIPAddress = null; target.AddGateway(); Assert.AreEqual(TextStrings.TxtErrInvalidIP, target.ErrorMessage); } GatewaySettingsViewModel_Accessor target = new GatewaySettingsViewModel_Accessor(); always throwing exception "Object reference not set to an instance of an object"
0
[ 2, 3458, 1120, 498, 1237, 1289, 550, 2352, 13, 7, 23793, 2801, 52, 309, 20, 40, 4851, 16, 40, 3095, 7, 800, 3726, 3726, 31, 589, 871, 1174, 21, 1237, 1289, 26, 718, 3195, 47, 1381, 248, 550, 6033, 5391, 9, 3563, 14, 249, 1289, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MediaElement Class Is Not Play the Media file in WPF Application === > MainWindow.Xaml <MediaElement Margin="10,10,10,0 " Name="McMediaElement" Width="450" Height="250" LoadedBehavior="Manual" Stretch="Fill" MediaOpened="Element_MediaOpened" MediaEnded="Element_MediaEnded" UnloadedBehavior="Stop" /> <Label Grid.Column="1" Grid.Row="1" Height="28" Margin="82,0,99,3.52" Name="FileNameLabel" VerticalAlignment="Bottom" Background="LightGreen"> </Label> <Button Height="23" Name="BrowseButton" Width="113" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,182,7.04" Grid.Row="1" VerticalAlignment="Bottom" Grid.ColumnSpan="2" FontWeight="Bold" Click="BrowseButtonClick"> Browse a Media </Button> > When Click BrowseButton Its get the file from open Dialog box and it put into the Lable control as FileNameLabel private void BrowseButtonClick(object sender, RoutedEventArgs e) { System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog(); dlg.InitialDirectory = "c:\\"; dlg.Filter = "Media files (*.wmv)|*.wmv|All Files (*.*)|*.*"; dlg.RestoreDirectory = true; if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string selectedFileName = dlg.FileName; FileNameLabel.Content = selectedFileName; McMediaElement.Source = new Uri(selectedFileName); McMediaElement.UpdateLayout(); McMediaElement.Play(); } } > its does not play the media file.so Plaese Suggest what the problem in code.
0
[ 2, 941, 27567, 718, 25, 52, 418, 14, 941, 3893, 19, 619, 7721, 3010, 800, 3726, 3726, 13, 1, 407, 27508, 9, 6791, 8184, 13, 1, 8260, 27567, 5440, 3726, 7, 1036, 15, 1036, 15, 1036, 15, 387, 13, 7, 204, 3726, 7, 4829, 8260, 275...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ImageMagick batch resizing performance === convert original.jpg -quality 85 -colorspace rgb -profile /var/tmp/sRGB.icm -strip -profile /var/tmp/sRGB.icm -filter Lanczos -write mpr:17JPCONV1-original +delete \ mpr:17JPCONV1-original -crop '3000x2001+0+491' -resize '190x126!>' -write thumbWide.jpg +delete \ mpr:17JPCONV1-original -crop '2981x2983+8+0' -resize '75x75!>' -write thumbStandard.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '163x163!>' -write hpSmall.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '1024x1019!>' -write jumbo.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '190x189!>' -write articleInline.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '2048x2037!>' -write superJumbo.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '592x589!>' -write tmagArticle.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '3000x2983!>' -write popup.jpg +delete \ mpr:17JPCONV1-original -crop '2981x2983+8+0' -resize '640x640!>' -write square640.jpg +delete \ mpr:17JPCONV1-original -crop '3000x1689+0+647' -resize '3000x1688!>' -write videoSmall.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '503x500!>' -write slide.jpg +delete \ mpr:17JPCONV1-original -crop '2981x2983+8+0' -resize '151x151!>' -write moth.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2001+0+491' -resize '337x225!>' -write hpMedium.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2001+0+491' -resize '395x264!>' -write sfSpan.jpg +delete \ mpr:17JPCONV1-original -crop '3000x1689+0+647' -resize '3000x1688!>' -write videoLarge.jpg +delete \ mpr:17JPCONV1-original -crop '3000x1689+0+647' -resize '511x288!>' -write hpLarge.jpg +delete \ mpr:17JPCONV1-original -crop '2981x2983+8+0' -resize '320x320!>' -write square320.jpg +delete \ mpr:17JPCONV1-original -crop '3000x1689+0+647' -resize '600x338!>' -write articleLarge.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2001+0+491' -resize '3000x2000!>' -write videoThumb.jpg +delete \mpr:17JPCONV1-original -crop '2981x2983+8+0' -resize '150x150!>' -write thumbLarge.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '533x530!>' -write blog533.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '151x151!>' -write blogSmallInline.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '362x360!>' -write tmagSF.jpg +delete \ mpr:17JPCONV1-original -crop '2981x2983+8+0' -resize '190x190!>' -write filmstrip.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '480x478!>' -write blog480.jpg +delete \ mpr:17JPCONV1-original -crop '3000x2983+0+0' -resize '427x425!>' -write blog427.jpg +delete \ mpr:17JPCONV1-original -crop '2981x2983+8+0' -resize '50x50!>' -write blogSmallThumb.jpg +delete \ mpr:17JPCONV1-original -crop '3000x1401+0+791' -resize '151x70!>' miniMoth.jpg; I am trying to generate ~30 crops from an original using one command (using one command is significantly faster than using a single command for each crop). However, this is taking quite a while (~30s) to finish. Any suggestions to speed this up? Can the resize command take advantage of GPUs via OpenCL?
0
[ 2, 1961, 21200, 197, 13064, 10719, 3335, 956, 800, 3726, 3726, 8406, 501, 9, 12851, 263, 13, 8, 15583, 8693, 13, 8, 11282, 5582, 761, 11400, 13, 8, 14503, 13, 118, 3311, 118, 38, 2554, 118, 18, 139, 11400, 9, 596, 79, 13, 8, 199...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
expected expression error within function === So I am trying to write a function that is pretty much just an IBAction that plays a media player. This is necessary in the code that I am writing as there will be multiple videos being used so to make my code more concise, I'd like to write the function so that the code for the media player goes in once instead of several times. When I try the code below, it states that I have an error on the IBAction stating "expected expression." any ideas? Also included in the code is a commented out if statement that does not work. Essentially I would like it so that when I click the default "done" button provided in the fullscreen media player, the window will close. Right now all the done button does is stop the video but I want the media player to close as well. void moviePlayer (id vidName, id type); void moviePlayer (id vidName, id type){ -(IBAction)playMovie{ NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"vidName" ofType:@"type"]]; MPMoviePlayerController *playerViewController = [[MPMoviePlayerController alloc] init]; playerViewController.contentURL = url; if (self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.interfaceOrientation == UIInterfaceOrientationLandscapeRight){ playerViewController.view.frame = CGRectMake(0, 0, 1030, 768); } else{ playerViewController.view.frame = CGRectMake(0,0, 768, 1004); } [playerViewController setControlStyle: MPMovieControlStyleFullscreen]; [playerViewController setScalingMode:MPMovieScalingModeAspectFit]; playerViewController.view.AutoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; [self.view addSubview:playerViewController.view]; [playerViewController play]; /*if (playerViewController == stop){ [self.playerViewController.view removeFromSuperview]; }*/ self.playerViewController = playerViewController; } }
0
[ 2, 1727, 1803, 7019, 363, 1990, 800, 3726, 3726, 86, 31, 589, 749, 20, 2757, 21, 1990, 30, 25, 1772, 212, 114, 40, 13, 4598, 8645, 30, 1533, 21, 941, 517, 9, 48, 25, 2378, 19, 14, 1797, 30, 31, 589, 1174, 28, 80, 129, 44, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ActiveAdmin Form not respecting :multiple => false === I'm using ActiveAdmin and trying to do a as: :select, :collection that isn't a multiple select. My code is: form do |f| f.input :users, :as => :select, :input_html => { :size => 1}, :multiple => false, collection: User.where(role:1), include_blank: false end Where this is in /admin/businesses.rb. The relationship is that there is habtm between Users and Businesses. I've tried rearranging my options as shown in the github issue (https://github.com/justinfrench/formtastic/issues/745). I've also looked at a similar stackoverflow question (http://stackoverflow.com/questions/11399139/collection-select-within-activeadmin). However, when I try with the :multiple => false, I get this code generated: <select id="business_user_ids" multiple="multiple" name="business[user_ids][]" size="1"> <option value="4">Pilgrim</option> <option value="5" selected="selected">Mary</option> <option value="6" selected="selected">Bob</option> <option value="7">Billy</option> <option value="8">Ash</option></select> Note that there are two selected, and the code for multiple is set to 'multiple'. Any one know why this is? Also, I'm trying to figure out how to display another field as what is selectable. For example, I have f.inputs :users. is there a way to rename what is shown for :users? Right now, it shows users.name, but I would like users.email. Thanks!
0
[ 2, 1348, 1283, 2160, 505, 52, 2873, 68, 13, 45, 21531, 5106, 800, 1, 4997, 800, 3726, 3726, 31, 22, 79, 568, 1348, 1283, 2160, 17, 749, 20, 107, 21, 28, 45, 13, 45, 18, 16964, 15, 13, 45, 15015, 872, 30, 2532, 22, 38, 21, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PL/SQL exception/goto/loop === I have a procedure that is supposed to selectively purge jobs from the system. It uses dbms_schedule.drop_job to perform this. I want to be able to loop through a group of jobs in a cursor dropping each one. If an exception is thrown because the job does not exist, I want to catch the exception and continue looping.
0
[ 2, 12443, 118, 18, 22402, 5391, 118, 839, 262, 118, 18786, 800, 3726, 3726, 31, 57, 21, 7004, 30, 25, 2293, 20, 14092, 102, 20722, 4844, 37, 14, 329, 9, 32, 2027, 13, 43, 13178, 18, 1, 18, 6261, 9813, 9, 12361, 1, 1636, 220, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to place in center of cluster rectangle? === The image is shown here. http://www.flickr.com/photos/83867447@N04/7678504128/sizes/h/in/photostream/ It may not look good as I have problem uploading it. Basically, the graph shows three clusters, each within one rectangle. The cluster is a linear sequence of nodes. One thing not elegant is the placement of nodes. The left cluster places nodes near the right side. The right cluster places near the left side. While the middle cluster, its nodes first come closer to the left cluster then to the center. Is it possible to position nodes in the center of cluster all along? Thank you.
0
[ 2, 184, 20, 209, 19, 459, 16, 7460, 27181, 60, 800, 3726, 3726, 14, 1961, 25, 1721, 235, 9, 7775, 6903, 6483, 9, 410, 10129, 139, 9, 960, 118, 25445, 18, 21701, 24696, 3828, 2918, 1, 103, 3277, 118, 25685, 17043, 4499, 2714, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Label or TextArea, need to have a certain cirteria === I need a label or text box thing with the following criteria. -Need to be horizontal scroll as needed. -No Border rectangle around the TextArea or label. -When scroll is need there will be one row of text and then scroll beneath. - When scroll is not needed I want any borders or or scrols gone and just the text centered between where the scroll and text met. I tried a TextArea but couldn't figure out how to remove the border of the rectangular box(I tried setBorder(null but didn't work) and couldn't figure out how to change positioning of text in the textArea. If I want it to be offset from the top or bottom and certain amount. Please help! Thankyou
0
[ 2, 1899, 54, 1854, 17760, 15, 376, 20, 57, 21, 1200, 14531, 25021, 800, 3726, 3726, 31, 376, 21, 1899, 54, 1854, 1649, 584, 29, 14, 249, 9157, 9, 13, 8, 556, 69, 20, 44, 10095, 12159, 28, 851, 9, 13, 8, 251, 1862, 27181, 140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS shared file === I have a file in an app downloaded from the network to the app's documents directory. I would like to open this file in another app (using a custom url scheme). I am running into a permissions issue since apps are sandboxed and other applications can't see the file in my app's documents directory. Where can I put the file so that other applications can read it?
0
[ 2, 13, 7760, 2592, 3893, 800, 3726, 3726, 31, 57, 21, 3893, 19, 40, 4865, 23887, 37, 14, 982, 20, 14, 4865, 22, 18, 4374, 16755, 9, 31, 83, 101, 20, 368, 48, 3893, 19, 226, 4865, 13, 5, 12655, 21, 5816, 287, 6362, 4276, 6, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
gmap in popup not appearing properly after once closed === I have made a test page where you can check that whats the exact problem. on first click its shows perfect map but when you close popup once and again click on `gmap` then popup opens but `gmap` shows one fourth. [this is link of test page][1] [1]: http://e-hotelspro.com/gmap.aspx
0
[ 2, 489, 15022, 19, 1675, 576, 52, 4870, 7428, 75, 382, 827, 800, 3726, 3726, 31, 57, 117, 21, 1289, 2478, 113, 42, 92, 2631, 30, 98, 18, 14, 5340, 1448, 9, 27, 64, 10840, 82, 1285, 2107, 2942, 47, 76, 42, 543, 1675, 576, 382, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Need to get MORE than one result from the entity manager === I've been trying to figure this one out for the last little while. In complete contrast to all those questions asking how to only get _one_ result from a JPA query, I need **more** than one result - I need all of them. I end up calling the entity manager's `find()` method, but it doesn't get me all of the nested results. 'Parent' class @Entity @Table(name = "LANGUAGE") public class LanguageData extends PersistedAuditedData<Long> { @Id @Column @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "ISO6391ALPHA2CODE") private String iso6391Alpha2Code; @OneToMany(fetch = FetchType.LAZY, mappedBy = "languageData") @MapKeyColumn(name = "LANGUAGE_ID") private Map<Long, LanguageDataLocalization> localizations; /** * Private no-arg constructor for reflection-based * construction inside JPA providers. */ @SuppressWarnings("unused") private LanguageData() { // Fields initialized by JPA. } // Plus getters for the fields. } 'Child' class @Entity @Table(name = "LANGUAGE_LOCALIZATION") public class LanguageDataLocalization extends PersistedAuditedData<LanguageLocalizationKey>{ @EmbeddedId private LanguageLocalizationKey id; @Column(name = "REFERENCE_NAME") private String name; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "LANGUAGE_ID", insertable = false, updatable = false) private LanguageData languageData; /** * Private no-arg constructor for reflection-based JPA provider instantiation. */ @SuppressWarnings("unused") private LanguageDataLocalization() { // Fields initialized by JPA. } // Plus getters for fields. } Key for 'Child' class. @Embeddable public class LanguageLocalizationKey { @Column(name = "LANGUAGE_ID") private Long languageId; @Column(name = "LANGUAGE_LOCALIZATION_ID") private Long languageLocalizationId; /** * No-arg constructor, for use by JPA provider implementation. * <h1>DO NOT USE!</h1> * <p>Ideally, this should be <code>private</code>, * however OpenJPA doesn't appear to be allowing that at the moment * (unsure of cause). This constructor does not initialize any data.</p> */ @SuppressWarnings("unused") public LanguageLocalizationKey() { // Field initialization performed by JPA provider. } // Plus getters } And used like so: @Transactional(readOnly = true, propagation = Propagation.SUPPORTS) private Collection<LanguageDataLocalization> getLocalizationsById(final Long id, final Collection<String> localeCodes) { try { if (localeCodes == null || localeCodes.isEmpty()) { final LanguageData data = entityManager.find(LanguageData.class, id); if (data == null) { return Collections.emptyList(); } else { return data.getlocalizations().values(); } } else { List<LanguageDataLocalization> results = entityManager.createNamedQuery("FIND_LANGUAGE_BY_ID", LanguageDataLocalization.class) .setParameter("iso6391Alpha2Codes", localeCodes) .setParameter("languageId", id) .getResultList(); return results; } } catch (NoResultException e) { // TODO: add logging return Collections.emptyList(); } } With `named-queries.xml` defined like so: <?xml version="1.0" encoding="UTF-8"?> <entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd "> <named-query name="FIND_LANGUAGE_BY_ID"> <query> SELECT localized FROM LanguageDataLocalization localized JOIN localized.localizationLanguage local WHERE localized.id.languageId = :languageId AND local.iso6391Alpha2Code IN :iso6391Alpha2Codes </query> </named-query> </entity-mappings> `LANGUAGE` data (Derby in-memory database, pretty sure that's not important): ID, ISO6391ALPHA2CODE 123, en 137, fr `LANGUAGE_LOCALIZATION` data LANGUAGE_ID, LANGUAGE_LOCALIZATION_ID, REFERENCE_NAME 123, 123, English 123, 137, anglais The actual problem is that when queried _without_ any locale data (`localeCodes` is null or empty), `data.getLocalizations().values()` after the `entityManager.find()` returns a list of only _one_ of the localized language-name data (the french one, but I'm assuming that's SQL 'random'). I **am** able to get both localizations if I explicitly query for them (either singly or together), so I know the data's _there_, and that the JPQL query works. What can I do to make it return both (all, when I have localization data for more than 2 languages) localizations when not queried for a specific one?
0
[ 2, 376, 20, 164, 91, 119, 53, 829, 37, 14, 9252, 1382, 800, 3726, 3726, 31, 22, 195, 74, 749, 20, 1465, 48, 53, 70, 26, 14, 236, 265, 133, 9, 19, 1279, 3710, 20, 65, 273, 2346, 3379, 184, 20, 104, 164, 13, 1, 849, 1, 829, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP read text from file then fill fields === I've a page that shows some fields that can be saved to a file by the following code: <?php if($_POST['Submit']) { $company = $_POST['company']; $address1 = $_POST['address1']; $address2 = $_POST['address2']; $address3 = $_POST['address3']; $address4 = $_POST['address4']; $contact = $_POST['contact']; $contact2 = $_POST['contact2']; $phone = $_POST['phone']; $data = "$company \n $address1 \n $address2 \n $address3 \n $address4 \n $contact \n $contact2 \n $phone\n"; //open the file $fh = fopen("/cfg/customers.txt", "a"); fwrite($fh, $data); //close the file fclose($fh); print "Information Submitted. Thanks"; } else { print <<<ENDOFTXT </style><form name="form1" method="post" action="index.php"> <table width="780" border="0" align="center"> <tr> <td width="256"><span class="style5">Company Name:</span></td> <td width="514"><input name="company" type="text" id="company"></td> </tr> <tr> <td><span class="style5">Address :</span></td> <td><input name="address1" type="text" id="address1" value=""></td> </tr> <tr> <td><span class="style5">Unit / Apt :</span></td> <td><input name="address2" type="text" id="address2"></td> </tr> <tr> <td><span class="style5">City, Pr : </span></td> <td><input name="address3" type="text" id="address3"></td> </tr> <tr> <td><span class="style5">Postal Code :</span></td> <td><input name="address4" type="text" id="address4"></td> </tr> <tr> <td><span class="style5">Contact Name: </span></td> <td><input name="contact" type="text" id="contact" value="First Name Last Name"></td> </tr> <tr> <td><span class="style5">Email: </span></td> <td><input name="contact2" type="text" id="contact2"></td> </tr> <tr> <td><span class="style5">Phone :</span></td> <td><input name="phone" type="text" id="phone" value="( ) "> <input name="Submit" type="submit" class="style5" value="Submit"></td> </tr> <tr> <td colspan="2"><div align="center"></div></td> </tr> </table> <p align="center">&nbsp;</p> </form> ENDOFTXT; } ?> Now, I can read the text file using the follwoing code: <?php $lines = file("/cfg/customers.txt"); $top200 = array_slice(array_reverse($lines),0,200); foreach($top200 as $line) { echo $line . "<br />"; } ?> But how can I put back to the original fields when the page loads for the first time? So, how can I merge the read routine to the above code? Lucas
0
[ 2, 13, 26120, 1302, 1854, 37, 3893, 94, 3509, 2861, 800, 3726, 3726, 31, 22, 195, 21, 2478, 30, 1285, 109, 2861, 30, 92, 44, 4377, 20, 21, 3893, 34, 14, 249, 1797, 45, 13, 1, 60, 26120, 100, 5, 4403, 1, 6962, 2558, 22, 7563, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Keep a stationary UITableViewCell while scrolling === Heres what I would like to do: have one stationary UITableViewCell that can be seen from ANYWHERE in the UITableView. So, when you just have less than 11 entries, it seems like the top cell is just the cell at the 0th index, but if you have more entries in the UITableView, then you can scroll down (usual behavior), but still have the UITableViewCell that was a the 0th index present. Almost like a header row that allows you to see specific items, similar to Excel. In Excel, you can put the top row stationary so when someone scrolls down where you shouldn't be able to see the top row, you still see it. If more explaining is needed just comment and I'll try to give a better explanation! Thanks in advance!
0
[ 2, 643, 21, 312, 1857, 13, 11193, 579, 4725, 9725, 133, 13, 28166, 800, 3726, 3726, 235, 18, 98, 31, 83, 101, 20, 107, 45, 57, 53, 312, 1857, 13, 11193, 579, 4725, 9725, 30, 92, 44, 541, 37, 4922, 19, 14, 13, 11193, 579, 4725,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Returning an array from a method with user input in java === I'm getting an illegal start of expression error next to public static double getAverage (double average) { I'm also getting an error stating "Variable average is not used" next to double average = sum /(double) arr.length; I've been working it for a while, I'm not sure what to do anymore. Any suggestions? import java.util.Scanner; public class Average { public static void main(String [] args){ Scanner input = new Scanner(System.in); System.out.print("How many numbers you want to display: "); int n=input.nextInt(); System.out.println("Enter array values: "); int arr [] = new int[n]; int sum=0; for(int i = 0; i < arr.length; i++) { arr[i] = input.nextInt(); sum+=arr[i]; double average = sum / (double) arr.length; public static double getAverage(double average){ System.out.println("Average value of array: " + average); { return average; } } }
0
[ 2, 2485, 40, 7718, 37, 21, 2109, 29, 4155, 6367, 19, 8247, 800, 3726, 3726, 31, 22, 79, 1017, 40, 5143, 799, 16, 1803, 7019, 328, 20, 317, 12038, 1494, 164, 27345, 13, 5, 14368, 862, 6, 13, 1, 31, 22, 79, 67, 1017, 40, 7019, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Documenting dispatching custom events (in actionscript 3) === Lets say my class X is able to dispatch 3 types of (custom) events. Where and how should I best document this behaviour within my class file?
0
[ 2, 4492, 68, 14226, 68, 5816, 963, 13, 5, 108, 1028, 8741, 203, 6, 800, 3726, 3726, 6884, 395, 51, 718, 993, 25, 777, 20, 14226, 203, 2551, 16, 13, 5, 4636, 6015, 6, 963, 9, 113, 17, 184, 378, 31, 246, 4492, 48, 7727, 363, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
json parser from goThere api start from 2nd object android === I am new to Json Parser. Currently i am trying to retreive some values from http://gothere.sg/maps/nav?output=js&client=&sensor=false&of=pt&m=p&f=&q=from%3A%20serangoon%20to%3A%20ang%20mo%20kio&callback=_ac._1h58bl6ik . The .js file return is not properly indented and start with a string("_ac._1h58bl6ik&&_ac._1h58bl6ik"). i attempted to remove them away by doing this. // read it and delimit it by using the 1st word(which is Status) and add them back BufferedReader reader = new BufferedReader(new InputStreamReader( is, "iso-8859-1"), 8); StringBuilder sb = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { sb.append(line + "n"); } is.close(); json = sb.toString(); String [] temp=json.split("Status"); String temp2="{\"Status" + temp[1]; json=temp2.substring(0, temp2.length()-2); After executing it, the string look normal and i proceed. jObj = new JSONObject(json); the jObj is a JSONObject. now i enter the debug mode. it shows it start from what i seems to be the 2nd Jsonobject("Placemark"). what i want from that json is the "Steps". which was in the 1st part. i need to understand this and i spent too long searching for answers. Please guide me. Thanks in advance!!!
0
[ 2, 487, 528, 2017, 4104, 37, 162, 1887, 21, 2159, 799, 37, 172, 706, 3095, 13005, 800, 3726, 3726, 31, 589, 78, 20, 487, 528, 2017, 4104, 9, 871, 31, 589, 749, 20, 13, 6239, 99, 1284, 109, 4070, 37, 7775, 6903, 839, 1887, 9, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Spin gem + autotest === I discovered the `spin` gem recently, and I'm trying to use it with `autotest` & `autotest-notification`, but I do not find any documentation about how it could work. I wonder if there are autotest option like `kicker` which allow custom binary option: kicker -r rails -b 'spin push' But I don't find it. If it does not exist, is there a way to have notification with kicker? Regards
0
[ 2, 3310, 8551, 2754, 3108, 10543, 800, 3726, 3726, 31, 1848, 14, 13, 1, 18, 3489, 1, 8551, 1989, 15, 17, 31, 22, 79, 749, 20, 275, 32, 29, 13, 1, 18042, 10543, 1, 279, 13, 1, 18042, 10543, 8, 1270, 4634, 1, 15, 47, 31, 107, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Excel VBA: SAVE user entries and OPEN project === Hello everybody and thanks for reading, I created a little excel program where users can fill their data in a few sheets and have the results in the last one. The program needs now to be able to save the user entries and to load them. My idea was to group all the entered data on a single sheet (let's name it Entries) through simple "links" (=Sheet1!A1 for example). This sheet would be exported. Saving a sheet is fairly easy through VBA commands as: ActiveWorkbook.SaveCopyAs FileName:="C:\Test\CopyBook.xls *But how can I effectively open the saved file and copy all the data into my program?* There are several examples on the net (see [here][1] and [there][2]) that show how to do, but always with the same problem. That is: if I just copy the data from the saved workbook, all my "links" will be erased. Is there a way to *synchronize* the data? Or is the only solution entering manually all the cell values in VBA and doing hundreds of range copies? Thanks a lot for your input! [1]: http://www.excelforum.com/excel-programming/629768-macro-to-grab-external-data-and-paste-values-into-a-master-spreadsheet.html [2]: http://www.excelforum.com/excel-programming/839708-importing-a-csv-file.html
0
[ 2, 20700, 566, 969, 45, 2079, 4155, 11399, 17, 368, 669, 800, 3726, 3726, 10975, 8903, 17, 3669, 26, 1876, 15, 31, 679, 21, 265, 20700, 625, 113, 3878, 92, 3509, 66, 1054, 19, 21, 310, 8801, 17, 57, 14, 1736, 19, 14, 236, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dictionary to Spare Vector Python === please help me on this homework: makeA({0: 1, 2: 1, 4: 2, 6: 1, 9: 1}) the output should be like this: [1, 0, 1, 0, 2, 0, 1, 0, 0, 1]
0
[ 2, 9186, 20, 8001, 7497, 20059, 800, 3726, 3726, 2247, 448, 55, 27, 48, 22334, 45, 233, 58, 5, 1, 387, 45, 137, 15, 4274, 137, 15, 3418, 172, 15, 9523, 137, 15, 561, 45, 137, 1, 6, 14, 5196, 378, 44, 101, 48, 45, 636, 165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
c# date time format for SQL_Latin1_General_CP1_CI_AS === How do i format a insert statement with date time for this collation... Currently: string SQLst = "UPDATE [LASTUPDATE] SET last_update = '" + DateTime.Now.ToString("yyyy-MM-dd") + "'"; This works for Latin1_General_CI_AS but now on a different server i need this statment to work with server set to collation SQL_Latin1_General_CP1_CI_AS this is the error i get: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value
0
[ 2, 272, 5910, 1231, 85, 2595, 26, 4444, 255, 1, 10577, 165, 1, 3661, 1, 7439, 165, 1, 1892, 1, 472, 800, 3726, 3726, 184, 107, 31, 2595, 21, 14692, 3331, 29, 1231, 85, 26, 48, 9470, 857, 9, 9, 9, 871, 45, 3724, 4444, 24239, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Web application that pushes data to client browser === Currently we have an Applet that interacts with our hardware and server via FTP, Sockets and HTTP messages. I have been asked if we can drop the applet and just go with a browser displaying dynamic web pages and JavaScript. I don't believe this is possible as it is my understanding that a browser can only display the response to a request that it has initiated while our application needs to display data it gets from hardware that is only sent when its sensors are tripped. I thought of using AJAX to periodically poll the hardware but I believe the same origin security restriction will prevent me from polling different hardware devices with different addresses. I could fix this by having the various hardware devices send all updates to the server but this would force a major change to the way we are currently configured. There is also a question of performance - it is a national application with hundreds of devices generating millions of events per day. I have to be able to respond in 3 seconds so I would have to poll the hardware very frequently (1 second or less) to maintain that level of performance. So is my understanding of web applications correct? Is there a way for a browser to display information **coming** ***from*** multiple addresses?
0
[ 2, 2741, 3010, 30, 16271, 1054, 20, 6819, 16495, 800, 3726, 3726, 871, 95, 57, 40, 4037, 38, 30, 10001, 18, 29, 318, 7610, 17, 8128, 1197, 1187, 306, 15, 18482, 18, 17, 7775, 7561, 9, 31, 57, 74, 411, 100, 95, 92, 2804, 14, 40...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JWS specify a schema === I'm doing a "Start from Java and WSDL" approach in building a jaxws. I have a customized schema that works against the web service when manually specified however I would like the java class to reference the schema so when I generate a WSDL the types generated are the types from the manually created schema. Is this possible?
0
[ 2, 487, 10268, 19077, 21, 23874, 800, 3726, 3726, 31, 22, 79, 845, 21, 13, 7, 13680, 37, 8247, 17, 619, 18, 8643, 7, 2141, 19, 353, 21, 11712, 10268, 9, 31, 57, 21, 28779, 23874, 30, 693, 149, 14, 2741, 365, 76, 23671, 9931, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...