unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Design tabhost in Eclipse === I have a question that I think is really easy answer if you know, how to I change the visible tab in Eclipse while developing the GUI in Ecplise? I can add tabs and add stuff to the outline and change it but I can't figure out how to change what Tab that is visible in the development view, I can only see the first tab... (If I move the tab I'm about to develop to first position the I can see you not the right way I guess?) Have search google and forum but no luck so far. Thanks in advance Best regards Oskar Norin Sweden
0
[ 2, 704, 6523, 11694, 19, 11652, 800, 3726, 3726, 31, 57, 21, 1301, 30, 31, 277, 25, 510, 2010, 1623, 100, 42, 143, 15, 184, 20, 31, 753, 14, 4560, 6523, 19, 11652, 133, 3561, 14, 9457, 19, 6695, 5727, 2628, 60, 31, 92, 3547, 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...
How to reset current tab if selected again === My application has tabs that also have child activies. I am trying to refresh the tab content to default whenever the same tab is selected again when already active. The thing I am asking about is actually working, but the way I've done it is not great in my opinion. I am using Intent.FLAG_ACTIVITY_CLEAR_TOP for reloading the tab when selected and > for(int i=0;i<tabWidget.getTabCount();i++) > { > tabWidget.getChildAt(i).setOnTouchListener(new OnTouchListener(){ > > public boolean onTouch(View v, MotionEvent event) { > int action = event.getAction(); > > if(action == MotionEvent.ACTION_UP) > { > String selectedTabTag = (String)tabHost.getCurrentTabTag(); > String currentTabTag = (String)v.getTag(); > if(selectedTabTag == currentTabTag) > { > > if(tabHost.getCurrentTab() == 0) > { > tabHost.setCurrentTab(1); > tabHost.setCurrentTabByTag(currentTabTag); > return false; > } > tabHost.setCurrentTab(0); > tabHost.setCurrentTabByTag(currentTabTag); > return false; > > } > > } > return false; > } > > }); > } So it first selects other tab and immediately switches back so it refreshes. I haven't figured out any easier way to do this.
0
[ 2, 184, 20, 23422, 866, 6523, 100, 1704, 188, 800, 3726, 3726, 51, 3010, 63, 6523, 18, 30, 67, 57, 850, 13, 19516, 1596, 9, 31, 589, 749, 20, 24905, 14, 6523, 2331, 20, 12838, 6634, 14, 205, 6523, 25, 1704, 188, 76, 614, 1348, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
TabHost refreshing other activities === I am doing a file transfer application where you can transfer with 1 file to another. I am using a TabHost creating 2 tabs and in these 2 tabs 1 listview is the untouchable and the other is onclick will add an item to listview1. My question is how does the other listview refresh itself when another tab is selected?. Does it just instantly transfer activity with no change at all or does it updates then shows?.
0
[ 2, 6523, 11694, 27134, 89, 1648, 800, 3726, 3726, 31, 589, 845, 21, 3893, 2617, 3010, 113, 42, 92, 2617, 29, 137, 3893, 20, 226, 9, 31, 589, 568, 21, 6523, 11694, 2936, 172, 6523, 18, 17, 19, 158, 172, 6523, 18, 137, 968, 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...
generating function: faster generation of F(n) === i recently gave a test... the question was long story and the solution boiled down to F(n) = 2*F(n-1) + 2*F(n-2)... I had an O(n) solution using dynamic programming... However, the examiner wasn't satisfied... my solution was to simply store every F(n) in an array as it is calculated. it took O(n) time. as we need just the previous two elements, by using just two variables, the space problem can be solved. however O(n) isn't fast enough... the function looks like the fibonacci function, and a fibonacci number can be generated in O(lg n) time... but am unable to get a O(lg n) soln for my problem.. so my question is how do i improve the time-complexity of the function?
0
[ 2, 13500, 1990, 45, 4233, 2782, 16, 398, 5, 103, 6, 800, 3726, 3726, 31, 1989, 492, 21, 1289, 9, 9, 9, 14, 1301, 23, 175, 609, 17, 14, 4295, 20898, 125, 20, 398, 5, 103, 6, 800, 172, 2483, 410, 5, 103, 8, 165, 6, 2754, 172...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
DESFire authentification decipher === I am currently working with DESFire EV1 contactless cards. I am trying to decipher a DES/CBC enciphered random_b with masterkey: "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00". I am using this code: `byte[] encipheredCodeRandomB = { (byte)0xEA ,(byte)0x18 ,(byte)0xDE ,(byte)0xFF ,(byte)0x52 ,(byte)0x0E,(byte)0xCD, (byte) 90}; byte[] masterKeyBytes = "0000000000000000".getBytes(); byte[] ivBytes = "00000000".getBytes(); DESKeySpec desKeySpec = new DESKeySpec(masterKeyBytes); SecretKeyFactory desKeyFact = SecretKeyFactory.getInstance("DES"); SecretKey s = desKeyFact.generateSecret(desKeySpec); aliceCipher = Cipher.getInstance("DES/CBC/NoPadding"); aliceCipher.init(Cipher.DECRYPT_MODE, s, new IvParameterSpec(ivBytes)); byte[] decipheredCodeRandomB = aliceCipher.doFinal(encipheredCodeRandomB);` but this code doesnt decipher correctly. Im getting this invalid result: "4B 9D 5A 91 AE 93 F8 ED" the correct one is: "A4 2F 3E 84 2C 5A 29 68"
0
[ 2, 1746, 5929, 10343, 2504, 38, 4634, 25277, 800, 3726, 3726, 31, 589, 871, 638, 29, 1746, 5929, 13, 2443, 165, 2203, 923, 4092, 9, 31, 589, 749, 20, 25277, 21, 1746, 118, 150, 7229, 1957, 11526, 1694, 69, 5477, 1, 220, 29, 1129, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Converting VB.NET Web Form to C# and wiring up events === In My VB.NET web page, I have this standard event. Note the "Handles" clause on teh event declaration. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub In my C# web app, I have this: protected void Page_Load(object sender, System.EventArgs e) { Since C# doesn't have a "Handles" equivalent and from what I've seen, event handlers are wired up using delegate += syntax, I was looking for this, but I could not foind it in the aspx page, aspx.cs file or the aspx.designer.cs file. In VB, I would have two drop down lists at the top of the Code Editor window and I could select any object on the web form or the web form itself and see the possible events for the object. Selecting the event would either take me to the event handler or if it didn't exists, it would create the stub for me. I know that the Properties window in C# (and I think in VB, too) has an Event tab that shows the list of events for the selected object GUI object, but "Page" doesn't appear as an object that can be selected. 1. Where does C# define the hooking up of the event to the handler? 2. How do I generate a stub for the Page event handler routine? I know that the handle appears by default, but what if it is deleted or I want to add a Page_initialize code? Is there an easy way to get the stub or do I need to go to the Object Browser for the syntax?
0
[ 2, 19583, 13, 20468, 9, 2328, 2741, 505, 20, 272, 5910, 17, 12701, 68, 71, 963, 800, 3726, 3726, 19, 51, 13, 20468, 9, 2328, 2741, 2478, 15, 31, 57, 48, 1236, 807, 9, 1945, 14, 13, 7, 3203, 1355, 7, 9040, 27, 13, 22314, 807, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Button on the left of a frame layout? === In a vertical linear layout, I have 2 textviews, then a button and then a frame layout. I would like the button to be on the left of the frame layout. I tried putting the button in a relative layout, but how do I tell the frame layout to be on the right? <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/content_container_white" android:orientation="vertical" > <TextView android:paddingLeft="30dp" android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/t0" android:textColor="@color/black" android:textSize="30dp" /> <TextView android:id="@+id/editText2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/t1" android:textColor="@color/black" /> <RelativeLayout android:id="@+id/RelativeLayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <Button android:layout_marginLeft="30dp" android:id="@+id/buybtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left" android:text="@string/buy_button" /> </RelativeLayout> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_gravity="center_horizontal|right" > <ImageButton android:id="@+id/videothumb" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|center_vertical" android:src="@drawable/button_play_on" /> <ImageView android:id="@+id/videothumbimage" android:layout_width="380dp" android:layout_height="170dp" android:scaleType="centerCrop" android:src="@drawable/demo_thumb_home" /> </FrameLayout> </LinearLayout>
0
[ 2, 5167, 27, 14, 225, 16, 21, 3523, 9106, 60, 800, 3726, 3726, 19, 21, 7035, 6745, 9106, 15, 31, 57, 172, 1854, 4725, 18, 15, 94, 21, 5167, 17, 94, 21, 3523, 9106, 9, 31, 83, 101, 14, 5167, 20, 44, 27, 14, 225, 16, 14, 352...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 I quickly dial up font sizes for the VS IDE without a mouse? === Maybe this isn't a "programming question" per se, but it relates to the coding process: One of the really neat features I like about the WPF-ized VS IDE is being able to hit Ctrl (I think it is) and thumb the mouse wheel to quickly change font size in the code editor. For work (desktop PC) that works great, but at home, on my laptop, I can't figure out how to accomplish it (other than going into Properties or whatever and changing font size there, which is obviously way less "handy" (no pun intended)). Is there a quick way to change edit font size without resorting to the dialog accessed via the menu?
0
[ 2, 92, 31, 976, 11601, 71, 9978, 13403, 26, 14, 4611, 13, 3448, 366, 21, 7567, 60, 800, 3726, 3726, 913, 48, 2532, 22, 38, 21, 13, 7, 19746, 3863, 1301, 7, 416, 1353, 15, 47, 32, 16429, 20, 14, 13, 15458, 953, 45, 53, 16, 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...
how to access complex data structures in Scala while preserving immutability? === Calling expert Scala developers! Let's say you have a large object representing a writable data store. Are you comfortable with this common Java-like approach: val complexModel = new ComplexModel() complexModel.modify() complexModel.access(...) Or do you prefer: val newComplexModel = complexModel.withADifference newComplexModel.access(...) If you prefer that, and you have a client accessing the model, how is the client going to know to point to newComplexModel rather than complexModel? From the user's perspective you have a mutable data store. How do you reconcile that perspective with Scala's emphasis on immutability? How about this: var complexModel = new ComplexModel() complexModel = complexModel.withADifference complexModel.access(...) This seems a bit like the first approach, except that it seems the code inside withADifference is going to have to do more work than the code inside modify(), because it has to create a whole new complex data object rather than modifying the existing one. (Do *you* run into this problem of having to do more work in trying to preserve immutability?) Also, you now have a var with a large scope. How would you decide on the best strategy? Are there exceptions to the strategy you would choose?
0
[ 2, 184, 20, 1381, 1502, 1054, 3815, 19, 25975, 133, 17936, 797, 7903, 4091, 60, 800, 3726, 3726, 2555, 5390, 25975, 10168, 187, 408, 22, 18, 395, 42, 57, 21, 370, 3095, 3793, 21, 20127, 579, 1054, 1718, 9, 50, 42, 5733, 29, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Jsoup login to get response === Im trying to get a response for failure or success for a login for a mobile website. here is part of my code. static final String AmwayURL = "https://m.amway.com/Default.ashx"; protected String connect(String username, String password) throws Exception { String result = ""; Response response = Jsoup.connect(AmwayURL) .data("userid", username) .data("userpswd", password) .method(Method.POST).execute(); Map<String, String> cookies = response.cookies(); Document document = response.parse(); result = document.toString(); return result; } can you help find out what i am doing wrong?
0
[ 2, 13005, 487, 656, 576, 6738, 108, 20, 164, 1627, 800, 3726, 3726, 797, 749, 20, 164, 21, 1627, 26, 2990, 54, 1280, 26, 21, 6738, 108, 26, 21, 3241, 2271, 9, 235, 25, 141, 16, 51, 1797, 9, 12038, 426, 3724, 589, 1443, 911, 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...
Image encoding and Decoding using Base64 in android application === In my application i have faced a small issue in encoding and decoding images to String and Pass it to web service. After getting the bitmap image it convert into byte[] and encode to String value but in Some cases it shows error i don't know why it comes. And one more doubt is Base64 class only supports to convert Bitmap image to String or any other tools available to do the same. Thanks in advance...
0
[ 2, 1961, 19608, 17, 121, 15458, 568, 1000, 3470, 19, 13005, 3010, 800, 3726, 3726, 19, 51, 3010, 31, 57, 3110, 21, 284, 1513, 19, 19608, 17, 121, 15458, 3502, 20, 3724, 17, 1477, 32, 20, 2741, 365, 9, 75, 1017, 14, 1142, 15022, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 ComboboxItems with button === I have created my own combobox style along with stylign combobox items. The dropdown needs to display some items with buttons and others without my items are created dynamically as follows: ComboBoxItem typeItem = new ComboBoxItem(); typeItem.Content = "Test"; typeItem.Tag = i; MyCombobox.Items.Add(typeItem); My question is how do I apply this style to some items and not others, my two comboboxitems are bellow? <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}"> <Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="VerticalContentAlignment" Value="Top" /> <Setter Property="MinHeight" Value="{DynamicResource ResourceKey=MinimumIteractSizeDips}" /> <Setter Property="MinWidth" Value="{DynamicResource ResourceKey=MinimumIteractSizeDips}" /> <Setter Property="Foreground" Value="Black"/> </Style> <Style x:Key="MyComboBoxItem" TargetType="{x:Type ComboBoxItem}"> <Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="VerticalContentAlignment" Value="Top" /> <Setter Property="MinHeight" Value="{DynamicResource ResourceKey=MinimumIteractSizeDips}" /> <Setter Property="MinWidth" Value="{DynamicResource ResourceKey=MinimumIteractSizeDips}" /> <Setter Property="Foreground" Value="Black"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ComboBoxItem"> <Grid> <Label Content="{TemplateBinding Content}" Foreground="Black" Background="White" Height="26" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"/> <Button Grid.Column="2" Grid.Row="0" Content="Settings" Height="23" HorizontalAlignment="Left" Margin="2" Name="PositionSettings" VerticalAlignment="Center" Width="57"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>
0
[ 2, 619, 7721, 22621, 5309, 2119, 79, 18, 29, 5167, 800, 3726, 3726, 31, 57, 679, 51, 258, 22621, 5309, 1034, 303, 29, 354, 3079, 9693, 22621, 5309, 3755, 9, 14, 2804, 2968, 2274, 20, 3042, 109, 3755, 29, 12861, 17, 654, 366, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 MSBuild correctly === I have `MyLib` library project along with several examples. The library and examples are in the same solution `MySolution`. In `MyLib` library project I have included MSBuild code to zip the whole solution and copy to another directory for internet publishing. <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /> <Target Name="AfterBuild" Condition="'$(Configuration)' == 'Release'"> <PropertyGroup> <ReleasePath>C:\Users\Administrator\Projects\CA\Libraries\ConvertApi-DotNet\</ReleasePath> <ZipFile>C:\Users\Administrator\Projects\CA\WebProject\libraries\ConvertApi-DotNet.zip</ZipFile> </PropertyGroup> <ItemGroup> <LibraryFiles Include="$(ReleasePath)\**\*.*" Exclude="$(ReleasePath)\**\*.user;$(ReleasePath)\**\*.suo;$(ReleasePath)\ConvertApi.*;$(ReleasePath)\**\packages\**;$(ReleasePath)\**\Lib.Test\**;$(ReleasePath)\**\*.nuspec;$(ReleasePath)\**\*.nupkg;$(ReleasePath)\**\*nuget*;$(ReleasePath)\**\*internal*;$(ReleasePath)\**\*ReSharper*\**;$(ReleasePath)\**\.svn\**;$(ReleasePath)\**\obj\**;$(ReleasePath)\lib\bin\Debug\**;$(ReleasePath)\lib\bin\Publish\**;$(ReleasePath)\Example\**\bin\**;" /> </ItemGroup> <Zip Files="@(LibraryFiles)" WorkingDirectory="$(ReleasePath)" ZipFileName="$(ZipFile)" ZipLevel="9" /> </Target> </Project> The problem is that when user download library and run on another computer the compiler show error that import library not found `MSBuild.Community.Tasks.Targets`. I would like to exclude ZipAndCopy code from project file when building the solution. How to do that?
0
[ 2, 184, 20, 275, 4235, 29361, 12044, 800, 3726, 3726, 31, 57, 13, 1, 915, 8326, 1, 1248, 669, 303, 29, 238, 3770, 9, 14, 1248, 17, 3770, 50, 19, 14, 205, 4295, 13, 1, 915, 18, 18687, 3309, 1, 9, 19, 13, 1, 915, 8326, 1, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 get http params from Cowboy? === I am using cowboy( https://github.com/extend/cowboy) for one restful web service, I need to get the params from "http://localhost:8080/?a=1&b=2&c=32" init({tcp, http}, Req, Opts) -> log4erl:debug("~p~n", [Opts]), {ok, Req, undefined_state}. handle(Req, State) -> {ok, Req2} = cowboy_http_req:reply(200, [], <<"Hello World!">>, Req), io:format("How to get the params from Req ? "), {ok, Req2, State}. terminate(Req, State) -> log4erl:debug("~p~p~n", [Req, State]), ok.
0
[ 2, 184, 20, 164, 7775, 2258, 79, 18, 37, 12992, 60, 800, 3726, 3726, 31, 589, 568, 12992, 5, 7775, 18, 6903, 10404, 20926, 9, 960, 118, 1706, 1316, 43, 118, 16947, 5352, 6, 26, 53, 760, 1566, 2741, 365, 15, 31, 376, 20, 164, 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 can i show 2 intro views when the app is launching? === I know if there is a file named Default.png it shows the image automatically. but, I want to change the image during it showes. FYI, I have 2 images Default.png and default2.png. I want to display default2.png after show Default.png. I tried followed codes, but it didn't work. What do I have to do? -(BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ //.................................................................. //self.window bullabulla~ [self performSelectorOnMainThread:@selector(showIntro2View) withObject:nil waitUntilDone:YES]; //[self showIntro2View]; //also tried this, but not work. [self.window addsubview:tabbarController]; [self.window makeKeyAndVisible]; } -(void) showIntro2View { UIImageView *intro2 = [[UIImageView alloc]initwithframe:cgrectmake(0,0,320,460)]; intro2.image = [UIImage imagenamed:@"default2.png"]; [self.window addSubview:intro2]; [self.window bringSubviewToFront:intro2]; [NSThread sleepfortimeinterval:2]; }
0
[ 2, 184, 92, 31, 298, 172, 17386, 4146, 76, 14, 4865, 25, 13762, 60, 800, 3726, 3726, 31, 143, 100, 80, 25, 21, 3893, 377, 12838, 9, 306, 2723, 32, 1285, 14, 1961, 7499, 9, 47, 15, 31, 259, 20, 753, 14, 1961, 112, 32, 298, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 create a shortcut using Google Drive API? === I've been reading the Google Drive API documentation but I don't understand how to create a shortcut to an external file. So far I've figured out how to log in and upload files by doing HTTP POSTs to www.googleapis.com using `openssl s_client` from the command line in Linux. The section [Creating Google Drive shortcuts to external files](https://developers.google.com/drive/apps-overview#creating_product_name_shortcuts_to_external_files) on page How Drive Apps Work describes shortcuts like this: "Shortcuts behave similarly to files. They can be opened and created, indexed in search, and shared with other users. Unlike regular files, shortcuts do not contain any content, and when synced to a desktop are opened as URLs in the user's browser. Synced shortcut files are assigned the .glink extension." This part here says that the shortcuts are opened in the browser at least when synced to a desktop. (It remains unclear to me what happens if you use Google Drive via a browser and try to click on a shortcut.) This also seems to say that shortcuts get a file extension .glink, but what does the part about syncing here mean? If I post a HTTP request to www.googleapis.com to create a shortcut, do I need to specify .glink as the file extension? The page I mentioned says to go to [Create a shortcut to a file](https://developers.google.com/drive/integrate-create#create_a_shortcut_to_a_file) for instructions on how to create a shortcut. That page tells me what mimetype to use and says to check the documentation for files.insert. On that page I can't find any information on how to create shortcuts. So how do you create a shortcut? Is there a parameter to files.insert where you specify a URL to redirect to user to?
0
[ 2, 184, 20, 1600, 21, 502, 4118, 568, 8144, 1493, 21, 2159, 60, 800, 3726, 3726, 31, 22, 195, 74, 1876, 14, 8144, 1493, 21, 2159, 13945, 47, 31, 221, 22, 38, 1369, 184, 20, 1600, 21, 502, 4118, 20, 40, 4886, 3893, 9, 86, 463, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 call a specific tab activity from another regular activity in android by using intent === i have 3 tabs (act1,act2,act3)and i have activities without tabs(A,B), if the user open activity A and press button ok, the alarm will start and after 10 seconds it will go to act2 this all done, but i tried many thing : 1- when i go to act2 it does not display the tabs. just act2 activity so i change the code and tried to : 2- when i go to activity tabs it show me the first tab(act1) but i wanna act2 how can i do it i wanna display act2 with tab if anyone can help me please
0
[ 2, 184, 92, 31, 645, 21, 1903, 6523, 2358, 37, 226, 1290, 2358, 19, 13005, 34, 568, 6936, 800, 3726, 3726, 31, 57, 203, 6523, 18, 13, 5, 5183, 165, 15, 5183, 135, 15, 5183, 240, 6, 290, 31, 57, 1648, 366, 6523, 18, 5, 58, 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...
android second button is not being dragged === When i click on the second button and try to drag it. It drags the first button. I think its something todo with the positioning of the buttons. But I am not sure exactly what is happening in the code. layout = (FrameLayout) findViewById(R.id.LinearLayout01); // layout.setOnTouchListener(this); btn = (Button) findViewById(R.id.btn); btn.setDrawingCacheEnabled(true); btn.setOnTouchListener(this); // the code for next button btn2 = (Button) findViewById(R.id.btn2); btn2 = (Button) findViewById(R.id.btn2); btn2.setOnTouchListener(this); // configure the params variable which uses the layoutparms function params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } public boolean onTouch(View view, MotionEvent me) { if (me.getAction() == MotionEvent.ACTION_DOWN) { status = START_DRAGGING; image = new ImageView(this); image.setImageBitmap(btn.getDrawingCache()); layout.addView(image, params); } if (me.getAction() == MotionEvent.ACTION_UP) { status = STOP_DRAGGING; System.out.println("stop"); Log.i("Drag", "Stopped Dragging"); } else if (me.getAction() == MotionEvent.ACTION_MOVE) { if (status == START_DRAGGING) { System.out.println("Dragging"); image.setPadding((int) me.getRawX(), (int) me.getRawY(), 0, 0); image.invalidate(); } } return false; } public boolean onTouch2(View view2, MotionEvent me2) { if(me2.getAction() == MotionEvent.ACTION_DOWN) { status = START_DRAGGING; image2 = new ImageView(this); image2.setImageBitmap(btn2.getDrawingCache()); layout.addView(image2, params); } if (me2.getAction() == MotionEvent.ACTION_UP) { status = STOP_DRAGGING; System.out.println("stop"); Log.i("Drag", "Stopped Dragging"); } else if (me2.getAction() == MotionEvent.ACTION_MOVE) { if (status == START_DRAGGING) { System.out.println("Dragging"); image2.setPadding((int) me2.getRawX()*2, (int) me2.getRawY()*2, 0, 0); image2.invalidate(); } } return false; }
0
[ 2, 13005, 153, 5167, 25, 52, 142, 7465, 800, 3726, 3726, 76, 31, 10840, 27, 14, 153, 5167, 17, 1131, 20, 5501, 32, 9, 32, 5501, 18, 14, 64, 5167, 9, 31, 277, 82, 301, 20, 537, 29, 14, 649, 68, 16, 14, 12861, 9, 47, 31, 589...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 insert data from dat to sql table? === I want to insert data from a .dat file to an sql table. But I dont want to use bulk insert. The dat file looks like this: dd qwe 3 ss asd 3 How can I do this? Thanks..
1
[ 2, 184, 20, 14692, 1054, 37, 1331, 38, 20, 4444, 255, 859, 60, 800, 3726, 3726, 31, 259, 20, 14692, 1054, 37, 21, 13, 9, 593, 38, 3893, 20, 40, 4444, 255, 859, 9, 47, 31, 1049, 259, 20, 275, 7238, 14692, 9, 14, 1331, 38, 389...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
VS2010 Looking for file in wrong directory === Visual Studio is looking in a completely wrong directory for a CS file. C:\TRUNK\MAIN\APPRESOURCES\APPINFO.CS I can't even find the Trunk file at this location. Correct Path: C:\Code\Branches\BR5\MAIN\APPRESOURCES\APPINFO.CS I've tried cleaning the solution, rebuilding, excluding and adding the file back to my solution. Heres the Stack Trace: Locating source for 'C:\TRUNK\MAIN\APPRESOURCES\APPINFO.CS'. Checksum: MD5 {ed 8a ff 89 84 3d 16 7e 9f 76 af 57 18 9f 62 7a} Determining whether the checksum matches for the following locations: 1: C:\Code\Branches\BR5\MAIN\APPRESOURCES\APPINFO.CS Checksum: MD5 {c5 33 96 ef ab 76 b1 3b aa 55 70 76 1b b5 d4 cf} Checksum doesn't match. The file 'C:\TRUNK\MAIN\APPRESOURCES\APPINFO.CS' does not exist.
0
[ 2, 4611, 2751, 699, 26, 3893, 19, 1389, 16755, 800, 3726, 3726, 3458, 1120, 25, 699, 19, 21, 1524, 1389, 16755, 26, 21, 272, 18, 3893, 9, 272, 45, 1, 8989, 5719, 1, 6232, 1, 7753, 99, 12097, 18, 1, 7753, 108, 4120, 9, 6824, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
decision tree error in SPSS is too big === I implement decision trees in SPSS using the CRT Growing Method. Iam using the datasets COCOMO81, NASA93, Desharnais, Maxwell. The values I get for estimate and std error in the table of Risk are too big like thousands. What can i do for it? I tried to change the nodes for parent node and child nodes but again I have the same problem. Please help me.
2
[ 2, 1401, 1541, 7019, 19, 3782, 18, 18, 25, 266, 580, 800, 3726, 3726, 31, 8713, 1401, 1913, 19, 3782, 18, 18, 568, 14, 6186, 38, 1991, 2109, 9, 31, 765, 568, 14, 1054, 3554, 18, 22470, 1293, 3980, 15, 8935, 4069, 15, 1746, 2269,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
One page load causing numerous PHP sessions IDs === I recently switched over to using our database to manage PHP sessions for our users. The database session handler I've implemented is, for the most part, the same as [this one][1]. [1]: http://www.nateklaiber.com/blog/2006/05/10/custom-php-session-handler "this one" That being said, I've run into some weird behavior. On a single page load, the PHP session ID is changing a few different times. For instance, the output below was written to a file during one page load using file_put_contents in my `_write` for my `session_set_save_handler()` call. I've searched the code and `session_regenerate_id()` is never called nor is `session_id(<new_id>)`. Furthermore, my php.ini has session.auto_start set to `Off`. Basically, I have no idea how the session ID could change in one page load given the above facts. The reason I noticed it is because the `REPLACE INTO` SQL statement from the linked to webpage is creating 8 or so rows in my database (one for each extra, different session id). As you can see, one of them is repeated for four times or so. That happens to be the only session ID that also has data associated with it when put into the database. f951tbvjkc8c5mv25aakfhoq86 f951tbvjkc8c5mv25aakfhoq86 f951tbvjkc8c5mv25aakfhoq86 f951tbvjkc8c5mv25aakfhoq86 eodjh2vhuo5ni1b7ia5ro6itf7 bada69955ld96fks0g057pp7i2 4n4c00ddlolb9k2t3uh2h66v37 lsqhhmfsund3bp3ocotcrj0l05 qvfe3qp6nupokcncp8jja8tsk0 4qfp9m3knabs88t6n1fkjo8oq6 g52du9v2fcsak27tjo7519q7j0 It may be worth noting that the page I'm loading has some AJAX requests in it to our own server. Furthermore, this behavior doesn't happen on all page loads on our site. So far I've narrowed it down to this one page that makes a few different AJAX requests. Thoughts?
0
[ 2, 53, 2478, 6305, 3242, 1548, 13, 26120, 5763, 13, 9178, 800, 3726, 3726, 31, 1989, 6667, 84, 20, 568, 318, 6018, 20, 4705, 13, 26120, 5763, 26, 318, 3878, 9, 14, 6018, 3723, 24641, 31, 22, 195, 6807, 25, 15, 26, 14, 127, 141, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
access network share from windows mobile 6.5 === this question addresses the same problem I had with http://stackoverflow.com/questions/11195985. This question focuses more on the specific problem I'm trying to solve. Rather than change the original question, to what is essentially a different question, I'm starting this new one. What I need to do is write a program for a device running windows mobile 6.5 that will copy files from a file share on a server to the mobile device. I've been looking for hours for a way to access the network share from the mobile device, and I am yet to be successful. Does anyone know of a way to access network shares from windows mobile 6.5, or can anyone confirm that that isn't supported.
0
[ 2, 1381, 982, 1891, 37, 1936, 3241, 400, 9, 264, 800, 3726, 3726, 48, 1301, 12636, 14, 205, 1448, 31, 41, 29, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 1306, 9611, 3058, 9, 48, 1301, 7155, 91, 27, 14, 1903, 144...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Content + Thumbnail for Nivo Slider === I am working on a project with involves the Nivo-slider. I could successfully manage to get the thumbnails working with the slider. Now what I am trying to archive is that below each image thumbnail I wanted to display some text. I am trying to use data-title or data-caption parameters to the images but unfortunately its not working... Here is the Demo URL: http://www.dfl.open-source-varsity.com/ Any kind of help would be appreciated
0
[ 2, 2331, 2754, 5078, 325, 947, 26, 1781, 2625, 3295, 106, 800, 3726, 3726, 31, 589, 638, 27, 21, 669, 29, 6569, 14, 1781, 2625, 8, 18, 1210, 1157, 9, 31, 110, 3673, 4705, 20, 164, 14, 5078, 325, 947, 18, 638, 29, 14, 3295, 106...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
FlexMobileProject, setStyle("textFormat",number) in textArea doesn't work === I create dynamic TextArea in Flex, i want to change its fontSize dynmically, but "setStyle" doesn't work. This is my code: ` var textArea:TextArea = new TextArea(); textArea.id = "txtCreaTaskAnalysis" +contatoreNumeroTextAreaCreaTaskAnalysis; textArea.left = 140; textArea.right = 45; textArea.horizontalCenter = 47; textArea.height = 110; textArea.y = posizioneYTextArea; var tfor:TextFormat = new TextFormat(); tfor.size= 25 ; textArea.setStyle("textFormat",tfor); textArea.text = tfor.size.toString(); addElement(textArea); ` I have this code in a buttonClickHandler, but the fontSize doesn't change. Help, please..
0
[ 2, 14409, 12571, 21011, 15, 309, 4381, 5, 7, 11969, 23588, 7, 15, 16299, 6, 19, 1854, 17760, 1437, 22, 38, 170, 800, 3726, 3726, 31, 1600, 7782, 1854, 17760, 19, 14409, 15, 31, 259, 20, 753, 82, 9978, 10454, 13, 21664, 79, 8438, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Cannot set 100% height of div as height resets to 0px === I'm trying to set the div height of the separate parent columns (and their children) to 100% but it doesn't seem to be working because the div height mysteriously just resets to 0. The **first column** has two child boxes (if I'm describing it correctly) which would take 50% (separately) of the page height. The **second and third** have one child box each which would both take 100% of the page height. In addition to this I want to add a place holder for the logo on the top left of the page and a footer at the bottom of the page. With all of the above it seems a bit daunting. Would appreciate your advice. In the end it should look like this: ![enter image description here][1] I've uploaded it here: http://jsfiddle.net/methuselah/qtmJW/ [1]: http://i.stack.imgur.com/ibRrX.png
0
[ 2, 1967, 309, 12849, 2947, 16, 13, 12916, 28, 2947, 23422, 18, 20, 713, 306, 396, 800, 3726, 3726, 31, 22, 79, 749, 20, 309, 14, 13, 12916, 2947, 16, 14, 1725, 4766, 7498, 13, 5, 290, 66, 391, 6, 20, 12849, 47, 32, 1437, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
is there a way to trigger a function on application of cell formatting (background colour) in a google spreadsheet? === In a Google Spreadsheet I want to apply formatting (cell background colour) to selected rows in other sheets based on the colour used in a specific cell in a specific sheet. If a user changes the source cell colour, I want this to be updated in the document. I'm using it to highlight related data - users can allocate a colour to a project and everywhere else in the doc where that project is referenced the cells will be highlighted the same colour. I've written a script to do this, called by the onEdit trigger, but it doesn't appear to fire when **just** the cell formatting is changed. Is there any way to trigger a function off a change to formatting alone?
0
[ 2, 25, 80, 21, 161, 20, 7286, 21, 1990, 27, 3010, 16, 1667, 2595, 1203, 13, 5, 1958, 8810, 4609, 6, 19, 21, 8144, 1789, 17627, 60, 800, 3726, 3726, 19, 21, 8144, 1789, 17627, 31, 259, 20, 5645, 2595, 1203, 13, 5, 9725, 2395, 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...
Creating a ZIP file from a folder in documents directory - Objective C (ARC) === I have an iPhone application that I have developed using ARC. I have a folder that contains a heap of images in my documents directory that I need to zip up and e-mail. My project uses ARC. Does anyone have any example code/links to a resource that would be helpful to me? I've been raking around online and what I can find is not compatible with ARC - even when it claims to be. Thanks a lot, Tysin
0
[ 2, 2936, 21, 12133, 3893, 37, 21, 19294, 19, 4374, 16755, 13, 8, 7038, 272, 13, 5, 16260, 6, 800, 3726, 3726, 31, 57, 40, 21024, 3010, 30, 31, 57, 885, 568, 4686, 9, 31, 57, 21, 19294, 30, 1588, 21, 15414, 16, 3502, 19, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
window.open() firing two requests? === I have a window.open('<Mapped URL>'); web.xml maps the above URL to a JSP For some reason, the JSP gets loaded twice. Confirmed by $(document).ready(function(){ alert("doc ready"); }); And sure enough, "doc ready" pops up twice. Instead of window.open(), if I do a $.mobile.changePage(), it works fine. ("doc ready" only once) Any ideas?
0
[ 2, 1463, 9, 10157, 5, 6, 7139, 81, 12279, 60, 800, 3726, 3726, 31, 57, 21, 1463, 9, 10157, 5, 22, 1, 79, 16664, 287, 6362, 1, 22, 6, 73, 2741, 9, 396, 8184, 6867, 14, 784, 287, 6362, 20, 21, 487, 3401, 26, 109, 1215, 15, 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...
Android Create Image Gallery from App Folder === I am working on an app and one of my activities is a screen that grabs all the images in a folder I made in the /data/ application folder. I would like to to grab all the photos lay them out in a grid format and then when a person clicks on one it blows it up to full size. Of course this gallery needs to change when new images are added to the folder. Seems like it would be some thing simple to do but I am having some trouble implementing this I keep finding a lot of different solutions non of which seem quite right. I'm assuming it would be some sort of gridview/listadapter combination. What would the best solution to this problem?
0
[ 2, 13005, 1600, 1961, 2246, 37, 4865, 19294, 800, 3726, 3726, 31, 589, 638, 27, 40, 4865, 17, 53, 16, 51, 1648, 25, 21, 2324, 30, 15555, 65, 14, 3502, 19, 21, 19294, 31, 117, 19, 14, 13, 118, 18768, 118, 3010, 19294, 9, 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...
direct parent of a element inside a th is the row? === why absolute element inside th have the parent set to the row instead of the th? how can make absolute positioned child element to position relative to th and not the row http://jsfiddle.net/tH7TK/
1
[ 2, 1744, 4766, 16, 21, 4520, 572, 21, 13, 96, 25, 14, 3131, 60, 800, 3726, 3726, 483, 7070, 4520, 572, 13, 96, 57, 14, 4766, 309, 20, 14, 3131, 700, 16, 14, 13, 96, 60, 184, 92, 233, 7070, 12125, 850, 4520, 20, 649, 4543, 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...
drupal - schedule a script to run at specific time === Totally new to drupal. I'm building a module that lets the user specifies the time to run an external script through a form. I imagine I'd need to play with `hook_cron` ? but from what I understand, it only runs when the cron is set up to run. So how do I tell Drupal to run the job at this time and that time,etc, everytime the user submits the form? For example, the form would look like: Start: 10:00 am End: 11:00 am <Submit> So when the user submits, Drupal will first run the script (defined in my module) at 10 am then again at 11 am. What module/hook do I need?
0
[ 2, 15708, 6720, 13, 8, 4345, 21, 3884, 20, 485, 35, 1903, 85, 800, 3726, 3726, 5139, 78, 20, 15708, 6720, 9, 31, 22, 79, 353, 21, 12613, 30, 6884, 14, 4155, 27669, 14, 85, 20, 485, 40, 4886, 3884, 120, 21, 505, 9, 31, 4382, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Given a UL, how to remove all items after 5, if any? === With jQuery is there a way remove an LI items after position 6? <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> </ul> A way to dynamically remove items 6+ (6 & 7 in this case) and not break if there are less than 6 items? Any ideas? Thanks
0
[ 2, 504, 21, 13, 1287, 15, 184, 20, 4681, 65, 3755, 75, 331, 15, 100, 186, 60, 800, 3726, 3726, 29, 487, 8190, 93, 25, 80, 21, 161, 4681, 40, 2093, 3755, 75, 649, 400, 60, 13, 1, 1287, 1, 13, 1, 1210, 1, 165, 1, 118, 1210, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Application and Sql Server / Database performance Review === As a team of three we got a task on hand to review performance bottlenecks of existing Application, Sql Server / Database. Application: Windows App (.net 3.5), Integration: SSIS / BizTalk, Reporting: SSRS, Sql Server 2008. Application point of view we are doing random code review / running dot trace and some other tasks (being done by other two guys). As a development dba i need to look into sql side of things. List i got on my hand are 1. Looking for Indexes (if any missing indexes or unwanted indexes) 2. Execution plans 3. FileStream setup 4. Backup stratagies 5. placing of log files. 6. RAID implementations. and so on. My question is ... is there a standard way of looking into this in a particular order. Are there any particular things I should be looking at? This is the first time am assigned with sort of perform review task ... so please bear with me if my question doesnt make a lot of sense. If need futher information please comment on.
0
[ 2, 3010, 17, 4444, 255, 8128, 13, 118, 6018, 956, 1487, 800, 3726, 3726, 28, 21, 173, 16, 132, 95, 330, 21, 3005, 27, 224, 20, 1487, 956, 4040, 9870, 18, 16, 3149, 3010, 15, 4444, 255, 8128, 13, 118, 6018, 9, 3010, 45, 1936, 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...
How to focus on input during a page load using jquery with JSF === When i construct my input manually i can focus on it however when i use a JSF tag to generate my inputs the form name is appended to the id and i can't reference it anymore. I've tried $("#username").focus(); and $("#loginForm:username").focus(); without any luck. Any advise? here is generated jsf html: <input id="loginForm:username" type="text" name="loginForm:username" size="30" /> This is my how i'm triggering the call... $(document).ready(function() { alert("checkA"); $("#username").focus(); alert("checkB"); });
0
[ 2, 184, 20, 1776, 27, 6367, 112, 21, 2478, 6305, 568, 487, 8190, 93, 29, 487, 18, 410, 800, 3726, 3726, 76, 31, 6960, 51, 6367, 23671, 31, 92, 1776, 27, 32, 207, 76, 31, 275, 21, 487, 18, 410, 3383, 20, 7920, 51, 6367, 18, 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 do I call a property from inside a javascript closure === I have a javascript closure and inside the method getresult() I want to call a property in the object quo. <html> <script type="text/javascript"> var quo = function(test) { talk:function() { return 'yes'; } return { getresult: function() { return quo.talk(); } } } var myQuo = quo('hi'); document.write(myQuo.getresult()); </script> </html> From inside getresult() how can I call the property talk?
0
[ 2, 184, 107, 31, 645, 21, 1354, 37, 572, 21, 8247, 8741, 7790, 800, 3726, 3726, 31, 57, 21, 8247, 8741, 7790, 17, 572, 14, 2109, 164, 29955, 5, 6, 31, 259, 20, 645, 21, 1354, 19, 14, 3095, 13, 8970, 9, 13, 1, 15895, 1, 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 method in Linq === i have a this method for convert date: Public Static string ConvertDate(DateTime dt) { .... } i want use method to Linq Code: var lst = (from L in AllList select new { ConvertDate(L.DateReg).ToString(), L.LastName, L.FirstName}); But there's an error in the code above. What is the correct code?
0
[ 2, 275, 2109, 19, 6294, 1251, 800, 3726, 3726, 31, 57, 21, 48, 2109, 26, 8406, 1231, 45, 317, 12038, 3724, 8406, 8209, 5, 8209, 891, 13, 43, 38, 6, 13, 1, 13, 9, 9, 9, 9, 13, 1, 31, 259, 275, 2109, 20, 6294, 1251, 1797, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 function import returns no columns using stored procedure with sequence.nextval === I have a working plsql oracle stored procedure (i have tested it in plsql and it return the correct value(s)): PROCEDURE FetchCode(code OUT NUMBER) IS BEGIN SELECT MYSEQ.NEXTVAL INTO code FROM DUAL; END FetchCode; and a visual studio solution using entity framework. I have been successful in pulling the above function into entity but when i try the "Get Column Information" button, I receive the "The selected stored procedure returns no columns." error. Under edit function import I can see that it: Returns a Collection of Scalars: Decimal The data type is set to "Number" and the direction is "Output". Can anyone help explain why a sp like this would work on plsql but not in visual studio?
0
[ 2, 9252, 6596, 1990, 9010, 4815, 90, 7498, 568, 8214, 7004, 29, 4030, 9, 20021, 3377, 800, 3726, 3726, 31, 57, 21, 638, 12443, 18, 22402, 15759, 8214, 7004, 13, 5, 49, 57, 7631, 32, 19, 12443, 18, 22402, 17, 32, 788, 14, 4456, 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...
get image from base64 string === I am trying to take a base64 encoded string and return it as an image in php using `$_POST`. On line one if I use `$_POST['imgdata']` it returns error from the `preg_match` if i were hard code the base64 string instead of using `$_POST` it all works and returns the image. how can i make this work by using the `$_POST` works $imgstr = 'data:image/png;base64,AAAFBfj42Pj4'; does not work $imgstr = $_POST['imgdata']; full code $imgstr = $_POST['imgdata']; // Grab the MIME type and the data with a regex for convenience if (!preg_match('/data:([^;]*);base64,(.*)/', $imgstr, $matches)) { die("error"); } // Decode the data $content = base64_decode($matches[2]); // Output the correct HTTP headers (may add more if you require them) header('Content-Type: '.$matches[1]); header('Content-Length: '.strlen($content)); // Output the actual image data echo $content;
0
[ 2, 164, 1961, 37, 1000, 3470, 3724, 800, 3726, 3726, 31, 589, 749, 20, 247, 21, 1000, 3470, 13665, 3724, 17, 788, 32, 28, 40, 1961, 19, 13, 26120, 568, 13, 1, 4403, 1, 6962, 1, 9, 27, 293, 53, 100, 31, 275, 13, 1, 4403, 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...
Not All Cells in TableView showing set font and color === I am trying to get my table view cells to show a certain font and color for each cell. Using the following code in the cellForRowAtIndexPath, most of the cells are showing new color and font, but for some reason there are 2 cells that don't. Any ideas? CGFloat nRed=204.0/255.0; CGFloat nBlue=0/255.0; CGFloat nGreen=153.0/255.0; UIColor *myColortext=[[UIColor alloc]initWithRed:nRed green:nBlue blue:nGreen alpha:1]; UIFont *cellFont = [UIFont fontWithName:@"noteworthy" size:15]; cell.textLabel.text = entry.articleTitle; cell.textLabel.font = cellFont; cell.textLabel.textColor = myColortext;
0
[ 2, 52, 65, 2934, 19, 859, 4725, 3187, 309, 9978, 17, 1665, 800, 3726, 3726, 31, 589, 749, 20, 164, 51, 859, 1418, 2934, 20, 298, 21, 1200, 9978, 17, 1665, 26, 206, 1667, 9, 568, 14, 249, 1797, 19, 14, 1667, 1106, 5417, 721, 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...
I cant remove child of this movie clip upon clicking the back button to go function goHomePage (evt:Event):void{ === Help. I need to remove the newContainer(this is a movie clip) after clicking the back button to go back to homepage. But it just loads the homepage and the newContainer is still there. :( where did i go wrong? import flash.events.MouseEvent; import flash.events.Event; import fl.motion.MotionEvent; import flash.net.URLVariables; import flash.display.MovieClip; import flashx.textLayout.elements.Configuration; var ctr:int = 0; var now:Date = new Date(); var myurl:String = "http://localhost:8888/eventspictures/getdata.php"; var scriptLoader:URLLoader = new URLLoader(); var scriptRequest:URLRequest = new URLRequest(); var newContainer:MovieClip; scriptRequest.url = myurl + "?ck=" + now.getTime(); scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccess); scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleError); scriptRequest.method = URLRequestMethod.POST; scriptLoader.load(scriptRequest); function handleLoadSuccess(evt:Event):void { for (var j:Number = 0; j <4; j++) { var newContainer:MovieClip = new con(); newContainer.name = String(ctr); newContainer.y = j*80 +65; newContainer.x= 16; stage.addChild(newContainer); var variables:URLVariables = new URLVariables(evt.target.data); trace(variables.output); var parse:String = variables.output; var parsed:Array = parse.split("<|>"); var tab:String = '&#09;'; var eventname:String = ''; var date:String=''; var slotsleft:String=''; // different variable names to assign to different column names(etc; eventname, date, slotsleft) // loop through.. start from O for (var i:Number = 0; i<parsed.length-1; i++) { trace(parsed[i]); var item:String = parsed[i]; var itemarray:Array = item.split(","); eventname += itemarray[2] + tab + "<br>"; date += itemarray[3] + tab; slotsleft += itemarray[4] + tab; trace(eventname); newContainer.eventname_txt.htmlText = eventname; newContainer.date_txt.htmlText= date; newContainer.slotsleft_txt.htmlText=slotsleft; } } //slotsleft_txt.x = 270; } function handleError(evt:IOErrorEvent):void { } backbutton_mc.addEventListener(MouseEvent.CLICK, goHomePage); function goHomePage (evt:Event):void{ gotoAndPlay("dashboard"); } stop();
0
[ 2, 31, 2973, 4681, 850, 16, 48, 1308, 12229, 685, 25590, 14, 97, 5167, 20, 162, 1990, 162, 8167, 6486, 13, 5, 2443, 38, 45, 4943, 38, 6, 45, 2625, 1340, 1, 800, 3726, 3726, 448, 9, 31, 376, 20, 4681, 14, 78, 1126, 5851, 106, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Error in loading site : Codeignator === My site is developed using Codeignator and was working fine before and now its showing error : http://maya3dmodels.com/index.php When I checked error log its showing : >[07-Jul-2012 09:17:11] PHP Warning: PHP Startup: Suhosin Extension does not officially >support PHP 5.2 and below anymore, because it is discontinued. Use it at your own risk. in >Unknown on line 0 >[07-Jul-2012 09:17:11] PHP Warning: >require(/home/maya3d/public_html/system/codeigniter/Common.php) [<a >href='function.require'>function.require</a>]: failed to open stream: No such file or >directory in /home/maya3d/public_html/system/codeigniter/CodeIgniter.php on line 38 >[07-Jul-2012 09:17:11] PHP Fatal error: require() [<a >href='function.require'>function.require</a>]: Failed opening required >'/home/maya3d/public_html/system/codeigniter/Common.php' > (include_path='.:/usr/lib/php:/usr/local/lib/php') in >/home/maya3d/public_html/system/codeigniter/CodeIgniter.php on line 38 Can anyone please help me to fix it ?
0
[ 2, 7019, 19, 12797, 689, 13, 45, 1797, 9693, 3457, 800, 3726, 3726, 51, 689, 25, 885, 568, 1797, 9693, 3457, 17, 23, 638, 1123, 115, 17, 130, 82, 3187, 7019, 13, 45, 7775, 6903, 3904, 58, 240, 43, 13998, 18, 9, 960, 118, 25671, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 -- Template tag in {% if %} block === I have the following dictionary passed to a render function, with sources being a list of strings and title being a string potentially equal to one of the strings in sources: {'title':title, 'sources':sources}) In the HTML template I'd like to accomplish something among the lines of the following: {% for source in sources %} <tr> <td>{{ source }}</td> <td> {% if title == {{ source }} %} Just now! {% endif %} </td> </tr> {% endfor %} However, the following block of text results in an error: TemplateSyntaxError at /admin/start/ Could not parse the remainder: '{{' from '{{' ...with `{% if title == {{ source }} %}` being highlighted in red.
0
[ 2, 3857, 14541, 13, 8, 8, 22894, 3383, 19, 13, 1, 11881, 100, 13, 11881, 1, 1921, 800, 3726, 3726, 31, 57, 14, 249, 9186, 1100, 20, 21, 16535, 1990, 15, 29, 2662, 142, 21, 968, 16, 7887, 17, 581, 142, 21, 3724, 9465, 2747, 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 configure proxy server in office ? === we are having wifi broadband in office and everyone is using it directly, now we feels we should have a proxy to monetize the traffic usage and may to be log all the web usage. We all are using Win vista/7, how can this be done ?
0
[ 2, 184, 20, 1065, 15951, 27188, 8128, 19, 488, 13, 60, 800, 3726, 3726, 95, 50, 452, 4807, 1707, 22831, 19, 488, 17, 1266, 25, 568, 32, 1703, 15, 130, 95, 5121, 95, 378, 57, 21, 27188, 20, 27054, 2952, 14, 2227, 7514, 17, 123, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 efficiently determine the minimum necessary size of a pre-rendered sine wave audio buffer for looping? === I've written a program that generates a sine-wave at a user-specified frequency, and plays it on a 96kHz audio channel. To save a few CPU cycles I employ the old trick of pre-rendering a short section of audio into a buffer, and then playing back the buffer in a loop, so that I can avoid calling the sin() function 96000 times per second for the duration of the program and just do simple memory-copying instead. My problem is efficiently determining what the minimum usable size of this pre-rendered buffer would be. For some frequencies it is easy -- for example, an 8kHz sine wave can be perfectly represented by generating a 12-sample buffer and playing it in a looping, because (8000*12 == 96000). For other frequencies, however, a single cycle of the sine wave requires a non-integral number of samples to represent, and therefore looping a single cycle's worth of samples would cause unacceptable glitching. For some of those frequencies, however, it's possible to get around that problem by pre-rendering more than one cycle of the sine wave and looping that -- if I can figure out how many cycles are required so that the number of cycles present in the buffer will be integral, while also guaranteeing that the number of samples in the buffer are integral. For example, a sine-wave frequency of 12.8kHz translates to a single-cycle buffer-size of 7.5 samples, which won't loop cleanly, but if I render two consecutive cycles of the sine wave into a 15-sample buffer, then I can cleanly loop the result. My current approach to solving this issue is brute force: I try all possible cycle-counts and see if any of them result in a buffer size with an integral number of samples in it. I think that approach is unsatisfactory for the following reasons: 1) It's very inefficient. For example, the program shown below (which prints buffer-size results for 480,000 possible frequency values between 0Hz and 48kHz) takes 35 minutes to complete on my 2.7GHz machine. I think there must be a much faster way to do this. 2) I suspect that the results are not 100% accurate, due to floating-point errors. 3) The algorithm gives up if it can't find an acceptable buffer size less than 10 seconds long. (I could make the limit higher, but of course that would make the algorithm even slower). So, is there any way to calculate the minimum-usable-buffer-size analytically, preferably in O(1) time? It seems like it should be easy, but I haven't been able to figure out what kind of math I should use. Thanks in advance for any advice! #include <stdio.h> #include <math.h> static const long long SAMPLES_PER_SECOND = 96000; static const long long MAX_ALLOWED_BUFFER_SIZE_SAMPLES = (SAMPLES_PER_SECOND * 10); // Returns the length of the pre-render buffer needed to properly // loop a sine wave at the given frequence, or -1 on failure. static int GetNumCyclesNeededForPreRenderedBuffer(float freqHz) { double oneCycleLengthSamples = SAMPLES_PER_SECOND/freqHz; for (int count=1; (count*oneCycleLengthSamples) < MAX_ALLOWED_BUFFER_SIZE_SAMPLES; count++) { double remainder = fmod(oneCycleLengthSamples*count, 1.0); if (remainder > 0.5) remainder = 1.0-remainder; if (remainder <= 0.0) return count; } return -1; } int main(int, char **) { for (int i=0; i<48000*10; i++) { double freqHz = ((double)i)/10.0f; int numCyclesNeeded = GetNumCyclesNeededForPreRenderedBuffer(freqHz); if (numCyclesNeeded >= 0) { double oneCycleLengthSamples = SAMPLES_PER_SECOND/freqHz; printf("For %.1fHz, use a pre-render-buffer size of %f samples (%i cycles, %f samples/cycle)\n", freqHz, (numCyclesNeeded*oneCycleLengthSamples), numCyclesNeeded, oneCycleLengthSamples); } else printf("For %.1fHz, there was no suitable pre-render-buffer size under the allowed limit!\n", freqHz); } return 0; }
0
[ 2, 184, 20, 20519, 3746, 14, 5187, 2378, 1072, 16, 21, 782, 8, 99, 16706, 69, 13, 18, 1149, 2367, 4023, 17497, 26, 5293, 68, 60, 800, 3726, 3726, 31, 22, 195, 642, 21, 625, 30, 7920, 18, 21, 13, 18, 1149, 8, 10134, 35, 21, 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...
How to draw a path or line between three coordinates in android google map view? === How to draw line between three geo points(co ordinates) in android google map view.most of the example shows between two geo points.
0
[ 2, 184, 20, 2003, 21, 2013, 54, 293, 128, 132, 13714, 19, 13005, 8144, 2942, 1418, 60, 800, 3726, 3726, 184, 20, 2003, 293, 128, 132, 6389, 819, 5, 716, 13, 23239, 18, 6, 19, 13005, 8144, 2942, 1418, 9, 4630, 16, 14, 823, 1285, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Python 2 and Python 3 dual development === I'm just starting a new Python project, and ideally I'd like to offer Python 2 and 3 support from the start, with minimal developmental overhead. My question is, what is the best way of doing this for brand new projects? I have come across projects that run 2to3, or even 3to2, as part of their installation script. This seems to be a very common way. However, there seems to be several different ways of doing this. I also came across [Distribute][1]. There is also the option of trying to write polyglot Python 2/Python 3 code. Even though this seems like a horrible idea, I have noticed that I tend to write code lately that is more idiomatic as Python 3 code, even though I still run it as Python 2. I have a feeling this only helps my own transition when the day finally arrives, and doesn't do much for offering or at least helping dual support though. Most of the projects offering dual support that I have seen added Python 3 support late, so I'm especially curious if there is a better way that is more suited for new projects, where you have the benefit of a clean slate. Thanks! [1]: http://packages.python.org/distribute/python3.html
0
[ 2, 20059, 172, 17, 20059, 203, 5747, 522, 800, 3726, 3726, 31, 22, 79, 114, 1422, 21, 78, 20059, 669, 15, 17, 5628, 102, 31, 22, 43, 101, 20, 1994, 20059, 172, 17, 203, 555, 37, 14, 799, 15, 29, 8663, 16005, 8860, 9, 51, 1301,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
In JXTable, root column is not taking other column color === ![enter image description here][1] I used swingx for table.The first column is not taking color rendering of JxTable. Plz give your valuable suggestion. Thanx in advance. [1]: http://i.stack.imgur.com/BwRTz.png
0
[ 2, 19, 487, 396, 5924, 15, 5900, 4698, 25, 52, 741, 89, 4698, 1665, 800, 3726, 3726, 13, 187, 2558, 13679, 1961, 5318, 235, 500, 2558, 165, 500, 31, 147, 5587, 396, 26, 859, 9, 124, 64, 4698, 25, 52, 741, 1665, 15307, 16, 487, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Ways to optimize my MySQL database === I have a MySQL database that contains all the words in the standard English alphabet, which I am using to create a simple Scrabble word generator. The database is separated into 26 tables: one for each letter in the alphabet. Each table contains two columns: - "Word" column: this column is the primary key, is of type char(12), and does not accept null values. - "Length" column: this column contains an unsigned tinyint value and does not accept null values. In my application, the user enters in any number of letters into a textbox (indicating their tiles) and I query the database using this code: // this is looped over 26 times, and $char is a letter between 'A' and 'Z' // check if the user entered in character $char or a blank tile (signified by ? in app) // this check prevents me from having to query useless tables if (in_array($char, $lettersArray) || $blanks) { // if so, select all words that have a length that's possible to make $query = 'SELECT Word FROM '.$char.'Words WHERE Length <= '.strlen($letters); $result = $db->query($query); $num_results = $result->num_rows; for ($j = 0; $j < $num_results; $j++) { // determine if it's possible to create word based on letters input // if so, perform appropriate code } } Everything is working, but my application takes a long time compared to the competition (theoretical competition, that is; this is more of a learning project I created for myself and I doubt I'll release it on the internet), despite the fact the application is on my local computer. I tried used the automatic optimization feature of phpMyAdmin, but that provided no noticeable speed increase.
0
[ 2, 2847, 20, 22864, 51, 51, 18, 22402, 6018, 800, 3726, 3726, 31, 57, 21, 51, 18, 22402, 6018, 30, 1588, 65, 14, 715, 19, 14, 1236, 486, 11844, 15, 56, 31, 589, 568, 20, 1600, 21, 1935, 13, 18, 7519, 13784, 833, 15286, 9, 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...
cakephp grouped find how to 'blank' column value when previous is the same === As a result from a grouped find, I get something like id name date project 2898 Noemi Araceli Farre Gutierrez 2012-07-23 mr12249-Northgate Field 2898 Noemi Araceli Farre Gutierrez 2012-07-24 mr12251-Marketon Field 2898 Noemi Araceli Farre Gutierrez 2012-07-25 mr12251-Marketon Field 2898 Noemi Araceli Farre Gutierrez 2012-07-26 mr12249-Northgate Field 3047 Mauricio Javier García 2012-07-22 mr12249-Northgate Field 3047 Mauricio Javier García 2012-07-23 mr12251-Marketon Field 3047 Mauricio Javier García 2012-07-26 mr12251-Marketon Field In my view i need to avoid repeating the id and name, and show like: id name date project 2898 Noemi Araceli Farre Gutierrez 2012-07-23 mr12249-Northgate Field 2012-07-24 mr12251-Marketon Field 2012-07-25 mr12251-Marketon Field 2012-07-26 mr12249-Northgate Field 3047 Mauricio Javier García 2012-07-22 mr12249-Northgate Field 2012-07-23 mr12251-Marketon Field 2012-07-26 mr12251-Marketon Field I could do it by comparing the current and previous value during the foreach loop in the view, but it seems to me there's got to be a better, cake way. Can you help? Thanks a lot !
0
[ 2, 8390, 26120, 19511, 477, 184, 20, 13, 22, 10754, 5719, 22, 4698, 1923, 76, 1158, 25, 14, 205, 800, 3726, 3726, 28, 21, 829, 37, 21, 19511, 477, 15, 31, 164, 301, 101, 4924, 204, 1231, 669, 1274, 3804, 90, 7411, 21, 7367, 1210...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
I want my subclass of UIView to refresh with the rest of the UI === I have a few subclassed items: MyViewController which contains: * MyImageView (displays a picture) * MyCrosshairView (a subclass of UIView that has a transparent background and sits directly on top of MyImageView). The intent of these classes is for a user to select a pixel from a picture by touching it. Once that happens I want to draw crosshairs on the image. However UIImageView doesn't allow you to overrride drawRect (it is never called in this class). My solution was to have MyCrosshairView sitting on top to draw the crosshairs. I can get the crosshairs to render just fine. The problem is that the refresh rate of the crosshairs is very slow. I put a breakpoint in MyCrosshairView drawRect and found (initially) that it wasn't firing ever. No problem, each time I have a touch event in MyImageView, I relay the message to MyViewController which then calls [myCrosshairView setNeedsDisplay]. As you can imagine, since this is happening on touch events, it's not called very often (compared to 30fps or so). It looks quite choppy. I am thinking there must be a way to tell MyCrosshairView that it should refresh with it's parent container without having to subclass MyViewController's main view and relaying the message from it's drawRect method. Is this correct? If so, how?
0
[ 2, 31, 259, 51, 972, 1898, 16, 13, 5661, 4725, 20, 24905, 29, 14, 760, 16, 14, 13, 5661, 800, 3726, 3726, 31, 57, 21, 310, 972, 1898, 69, 3755, 45, 51, 4725, 12898, 1252, 56, 1588, 45, 1637, 51, 22039, 4725, 13, 5, 2906, 5438,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
String to JSON Array unrecognized selector error === I'm trying to parse some JSON to a NSArray but I'm getting the following error: [__NSCFDictionary length]: unrecognized selector sent to instance 0x6d7a160 The area of code that's throwing this error is: - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; NSError* error; NSLog(responseString); NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error]; parties2=jsonArray; NSLog([parties2 objectAtIndex:0]); //Exception thrown [tableView reloadData]; } parties2 is previously defined as: parties2=[NSArray arrayWithObjects:nil]; My ResponseString looks like [{"Name":"party 1.1","GreekName":"FoA 1","GreekID":325,"schoolName":"FoA University","schoolID":10,"numberAttending":0,"maxNumberAttending":1000,"price":15.0},{"Name":"party 1.2","GreekName":"FoA 1","GreekID":325,"schoolName":"FoA University","schoolID":10,"numberAttending":0,"maxNumberAttending":300,"price":20.0},{"Name":"party 1.3","GreekName":"FoA 1","GreekID":325,"schoolName":"FoA University","schoolID":10,"numberAttending":0,"maxNumberAttending":5000,"price":25.0},{"Name":"party 2.1","GreekName":"FoA 2","GreekID":326,"schoolName":"FoA University","schoolID":10,"numberAttending":0,"maxNumberAttending":500,"price":25.0},{"Name":"party 2.2","GreekName":"FoA 2","GreekID":326,"schoolName":"FoA University","schoolID":10,"numberAttending":0,"maxNumberAttending":300,"price":30.0},{"Name":"party 3.1","GreekName":"FoA 3","GreekID":327,"schoolName":"FoA University","schoolID":10,"numberAttending":0,"maxNumberAttending":0,"price":50.0},{"Name":"party 5.1","GreekName":"FoA 5 ","GreekID":329,"schoolName":"FoA University","schoolID":10,"numberAttending":0,"maxNumberAttending":300,"price":15.75}] This is my first venture with ObjC, I'm coming from a .Net C# background so chances are I'm missing a very simple thing. Thanks :)
0
[ 2, 3724, 20, 487, 528, 7718, 367, 99, 13974, 103, 1333, 23946, 7019, 800, 3726, 3726, 31, 22, 79, 749, 20, 2017, 870, 109, 487, 528, 20, 21, 13, 103, 4964, 2787, 47, 31, 22, 79, 1017, 14, 249, 7019, 45, 636, 1, 2172, 8940, 225...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 an array item in dancer? === I try to display an array item in dancer, here is the code: get '/' => sub { my @rows = ('aaa','bbb','ccc'); template 'crud.tt', {'rows' => \@rows}; }; and the template is: <h2><% $rows[1] %></h2> <h2><% rows[1] %></h2> <% FOREACH r IN rows %> <p><% r %></p> <% END %> In the h2 element show nothing, what is the right way?
0
[ 2, 184, 20, 3042, 40, 7718, 9101, 19, 7799, 60, 800, 3726, 3726, 31, 1131, 20, 3042, 40, 7718, 9101, 19, 7799, 15, 235, 25, 14, 1797, 45, 164, 13, 22, 118, 22, 800, 1, 972, 13, 1, 51, 13, 1, 5417, 18, 800, 13, 5, 22, 22160...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
EXC_BAD_ACCESS from JSONKit === I keep running into EXC_BAD_ACCESS when calling `[obj JSONString]` method in the following code and I don't know why. I have tried turning on Zombie Objects but nothing different happens. - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSDictionary *obj = @{ @"id": @1, @"date": @"11/07/2012", @"companyInfo": @"Company Details", @"customerInfo": @"Customer Details", @"taxRate": @0 }; NSLog(@"%@", obj); NSLog(@"%@", [obj JSONString]); // Other stuff here } I am running Lion. I have just upgraded to Xcode 4.4 and am using CocoaPods 0.9.2 to install JSONKit. I have tried both the `1.4` and `1.5pre` versions of JSONKit to no avail. I am using the latest OS X SDK (10.8) with a deployment target of 10.6 (it must deploy to 10.6). I have also tried the 10.7 SDK but the results are the same. The 10.6 SDK is no longer available so I cannot test that. `clang --version` shows: Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.0 Thread model: posix The application compiled and ran correctly when I was using Xcode 4.3.
0
[ 2, 1396, 150, 1, 5989, 1, 20604, 37, 487, 528, 13703, 800, 3726, 3726, 31, 643, 946, 77, 1396, 150, 1, 5989, 1, 20604, 76, 2555, 13, 1, 2558, 111, 11741, 487, 528, 11130, 500, 1, 2109, 19, 14, 249, 1797, 17, 31, 221, 22, 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...
Cannot load my blender model into jmonkeyengine === The manual says jomonkeyengine should be able to load .blend models directly if I just register the right loader. But it doesn't work for me. I get this exception that I can't understand: java.lang.IllegalStateException: Unknown curve rna path: pose.bones["torso"]["pivot_slide"] at com.jme3.scene.plugins.blender.animations.IpoHelper.getCurveType(IpoHelper.java:135) at com.jme3.scene.plugins.blender.animations.ArmatureHelper.getTracks250(ArmatureHelper.java:196) at com.jme3.scene.plugins.blender.animations.ArmatureHelper.getTracks(ArmatureHelper.java:164) at com.jme3.scene.plugins.blender.modifiers.ArmatureModifier.<init>(ArmatureModifier.java:132) at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readModifiers(ModifierHelper.java:91) at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:167) at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(AbstractBlenderLoader.java:132) at com.jme3.scene.plugins.blender.BlenderLoader.toObject(BlenderLoader.java:70) at com.jme3.scene.plugins.blender.BlenderLoader.load(BlenderLoader.java:87) at com.jme3.scene.plugins.blender.BlenderLoader.load(BlenderLoader.java:70) at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:282) at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:410) at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420) at adventure.Main.simpleInitApp(Main.java:305) at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225) at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129) at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205) at java.lang.Thread.run(Thread.java:679) What do you think is wrong? The code I used is assetManager.registerLoader(BlenderLoader.class, "blend"); Spatial model3 = assetManager .loadModel("objects/creatures/alien/alienmodel.blend");
0
[ 2, 1967, 6305, 51, 11138, 106, 1061, 77, 487, 2111, 4237, 16847, 800, 3726, 3726, 14, 5132, 898, 2640, 2111, 4237, 16847, 378, 44, 777, 20, 6305, 13, 9, 2854, 706, 2761, 1703, 100, 31, 114, 2243, 14, 193, 6305, 106, 9, 47, 32, 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 create a creational mapper? === At this momment, I'm dealing with a creational mapper. I'm using a dictionary and when you get one value of it, the dictionary must return the object created. IDictionary<object1, Type> mapper; The problem here is, I need all the time to get the same instance if I get the item again. For example if I want to get two times the object "foo", I should get two times the same object. Any ideas?
0
[ 2, 184, 20, 1600, 21, 2502, 192, 2942, 1432, 60, 800, 3726, 3726, 35, 48, 1641, 1130, 15, 31, 22, 79, 5746, 29, 21, 2502, 192, 2942, 1432, 9, 31, 22, 79, 568, 21, 9186, 17, 76, 42, 164, 53, 1923, 16, 32, 15, 14, 9186, 491, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Is it possible to exclude all css styling for one specific div container? === I'm having problems using `font-face` on my website. I can get it working when testing it on a html file with it's own styling, but not if I include other style sheets. I've tried overriding stles, placing style sheets in different order and so on, but nothing works. So I'm wondering, is it possible to exclude all CSS and only use css from one css file for a specific div container? (Without using `iframe`)
0
[ 2, 25, 32, 938, 20, 21077, 65, 272, 18, 18, 23020, 26, 53, 1903, 13, 12916, 12147, 60, 800, 3726, 3726, 31, 22, 79, 452, 1716, 568, 13, 1, 21931, 8, 6413, 1, 27, 51, 2271, 9, 31, 92, 164, 32, 638, 76, 4431, 32, 27, 21, 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...
Call to methods results in "Message: Object reference not set to an instance of an object." === I cannot figure out why I any of these methods (load_qc_form(); enable_qc_form();disable_qc_form();) I get the "Message: Object reference not set to an instance of an object." message. How can calling a method return null?? Here is my entire code. I am new to C# and am trying to update an existing page. Could someone point me in the right direction? I want to be able to call these methods from anywhere in the application. namespace test_page { using System; //using System.Windows.Forms; using System.Data; using System.Drawing; using System.Web; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data.SqlClient; /// <summary> /// Summary description for ProductionQC. /// </summary> /// public class hendrix : System.Web.UI.UserControl { #region class_variable_declarations //Test Boxes protected System.Web.UI.WebControls.TextBox boxOrder; protected System.Web.UI.WebControls.TextBox boxBox; protected System.Web.UI.WebControls.TextBox boxPallet; protected System.Web.UI.WebControls.TextBox boxPulpTemp; protected System.Web.UI.WebControls.TextBox boxComments; protected System.Web.UI.WebControls.TextBox boxMajdef1; protected System.Web.UI.WebControls.TextBox boxMajdef2; protected System.Web.UI.WebControls.TextBox boxMajdef3; protected System.Web.UI.WebControls.TextBox boxMindef1; protected System.Web.UI.WebControls.TextBox boxMindef2; protected System.Web.UI.WebControls.TextBox boxMindef3; protected System.Web.UI.WebControls.TextBox boxSamples; //drop down lists protected System.Web.UI.WebControls.DropDownList listYN; protected System.Web.UI.WebControls.DropDownList listMaj1; protected System.Web.UI.WebControls.DropDownList listMaj2; protected System.Web.UI.WebControls.DropDownList listMaj3; protected System.Web.UI.WebControls.DropDownList listMin1; protected System.Web.UI.WebControls.DropDownList listMin2; protected System.Web.UI.WebControls.DropDownList listMin3; protected System.Web.UI.WebControls.DropDownList listRecorder; //labels protected System.Web.UI.WebControls.Label lblPalletTag; protected System.Web.UI.WebControls.Label lblmajdef1; protected System.Web.UI.WebControls.Label lblmajdef2; protected System.Web.UI.WebControls.Label lblmajdef3; protected System.Web.UI.WebControls.Label lblmindef1; protected System.Web.UI.WebControls.Label lblmindef2; protected System.Web.UI.WebControls.Label lblmindef3; protected System.Web.UI.WebControls.Label lblPulpTemp; protected System.Web.UI.WebControls.Label lblComments; protected System.Web.UI.WebControls.Label lblPackageCorrect; protected System.Web.UI.WebControls.Label lblTotSamples; protected System.Web.UI.WebControls.Label lblrecorder; //Buttons protected System.Web.UI.WebControls.Button btnGo; protected System.Web.UI.WebControls.Button btnGo2; protected System.Web.UI.WebControls.Button btnGo3; protected System.Web.UI.WebControls.Button btnClear; //Gridviews protected System.Web.UI.WebControls.GridView grdDisplayOrd; protected System.Web.UI.WebControls.GridView grdDisplayBox; //Data connections - adapters protected System.Data.SqlClient.SqlCommand cmdData; protected System.Data.SqlClient.SqlConnection sqlConnection1; protected System.Data.SqlClient.SqlDataReader dataReader; #endregion class_variable_declarations private void Page_Load(object sender, System.EventArgs e) { //initializePage(); // Put user code to initialize the page here if (!this.Page.IsPostBack) { //load_qc_form(); //disable_qc_form(); } } //private void initializePage() // { // throw new NotImplementedException(); //} #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.sqlConnection1 = new System.Data.SqlClient.SqlConnection(); this.btnGo.Click += new System.EventHandler(this.btnGo_Click); this.btnGo2.Click += new System.EventHandler(this.btnGo2_Click); // this.btnGo3.Click += new System.EventHandler(this.btnGo3_Click); this.btnClear.Click += new EventHandler(this.btnClear_Click); // // sqlConnection1 // this.sqlConnection1.ConnectionString = "workstation id=\"******";packet size=4096;user id=******;data source=\"******";persis" + "t security info=True;initial catalog=****;password=**********"; this.Load += new System.EventHandler(this.Page_Load); } #endregion // public virtual string DisplayMember { get; set; } //get and display order data private void btnGo_Click(object sender, System.EventArgs e) { { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "Select ord.order_number as Order#,var.description as Description,grd.description as Grade, " + "size.description as Size,pkg.description as Pkg, ord.container_type as Pallet " + "FROM t_item_master itm INNER JOIN t_order_detail ord (NOLOCK) ON ord.item_number = itm.item_number " + "LEFT OUTER JOIN t_package pkg (NOLOCK) ON pkg.package_name = itm.product_package_code " + "LEFT OUTER JOIN t_grade grd (NOLOCK) ON grd.grade_id = itm.grade_id " + "LEFT OUTER JOIN t_size size (NOLOCK) ON size.size_id = itm.size_id AND size.package_id = pkg.package_id " + "LEFT OUTER JOIN t_variety var (NOLOCK) ON var.variety_id = itm.variety_id " + "WHERE order_number like @order_number"; cmd.Parameters.Add("@order_number", SqlDbType.VarChar).Value = boxOrder.Text; cmd.CommandType = CommandType.Text; cmd.Connection = this.sqlConnection1; this.sqlConnection1.Open(); this.grdDisplayOrd.Visible = true; SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adpt.Fill(ds); grdDisplayOrd.DataSource = ds; grdDisplayOrd.DataBind(); this.sqlConnection1.Close(); } } // get and display box data private void btnGo2_Click(object sender, System.EventArgs e) { { load_qc_form(); SqlCommand cmd = new SqlCommand(); HyperLink test_link1 = new HyperLink(); cmd.CommandText = "select " + "item_number as Item#, " + "description as Desctiption, " + "grower_lot as Lot#, " + "pack_date as Packed " + "from v_box_data where box_id = @box_id"; cmd.Parameters.Add("@box_id", SqlDbType.VarChar).Value = boxBox.Text; cmd.CommandType = CommandType.Text; cmd.Connection = this.sqlConnection1; this.sqlConnection1.Open(); this.grdDisplayBox.Visible = true; SqlDataAdapter adpt = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adpt.Fill(ds); grdDisplayBox.DataSource = ds; grdDisplayBox.DataBind(); this.sqlConnection1.Close(); } } private void load_qc_form() { #region declare_variables // string pallet_tag; //string correct_package; //string total_samples; //string majdef1; //string majdef2; //string majdef3; // string mindef1; // string mindef2; // string mindef3; // string majcnt1; // string majcnt2; //string majcnt3; // string mincnt1; // string mincnt2; // string mincnt3; // string pulptemp; // string comments; string recorder; #endregion declare_variables #region fill_list_recorder try { listRecorder.Items.Clear(); recorder = "select EMPID,FIRSTNAME+' '+LASTNAME from t_famous_employee " + "where COSTCENTERNAME like 'Quality Control - 2011' " + "and HOMECREWID LIKE 'Shipping' "; cmdData = new System.Data.SqlClient.SqlCommand(recorder, this.sqlConnection1); cmdData.Connection = this.sqlConnection1; this.sqlConnection1.Open(); SqlDataAdapter da = new SqlDataAdapter(cmdData); DataTable dt = new DataTable(); da.Fill(dt); listRecorder.DataBind(); listRecorder.DataSource = dt; listRecorder.DataValueField = "EMPID"; listRecorder.DataTextField = "FIRSTNAME+' '+LASTNAME"; this.listRecorder.Items.Insert(0, "FIRSTNAME+' '+LASTNAME"); } catch (Exception) { } this.dataReader.Close(); #endregion } private void btnGo3_Click(object sender, System.EventArgs e) { { } } private void btnClear_Click(object sender, System.EventArgs e) { { this.boxOrder.Text = ""; this.boxBox.Text = ""; this.grdDisplayOrd.Visible = false; this.grdDisplayBox.Visible = false; //disable_qc_form(); } } private void enable_qc_form() { this.listMaj1.Enabled = true; this.listMaj2.Enabled = true; this.listMaj3.Enabled = true; this.listMin1.Enabled = true; this.listMin2.Enabled = true; this.listMin3.Enabled = true; this.listYN.Enabled = true; this.listMaj1.Enabled = true; this.listMaj2.Enabled = true; this.listMaj3.Enabled = true; this.listMin1.Enabled = true; this.listMin2.Enabled = true; this.listMin3.Enabled = true; this.boxComments.Enabled = true; this.boxMajdef1.Enabled = true; this.boxMajdef2.Enabled = true; this.boxMajdef3.Enabled = true; this.boxMindef1.Enabled = true; this.boxMindef2.Enabled = true; this.boxMindef3.Enabled = true; this.boxPallet.Enabled = true; this.boxPulpTemp.Enabled = true; this.boxSamples.Enabled = true; this.lblComments.Enabled = true; this.lblmajdef1.Enabled = true; this.lblmajdef2.Enabled = true; this.lblmajdef3.Enabled = true; this.lblmindef1.Enabled = true; this.lblmindef2.Enabled = true; this.lblmindef3.Enabled = true; this.lblPackageCorrect.Enabled = true; this.lblPalletTag.Enabled = true; this.lblPulpTemp.Enabled = true; this.lblTotSamples.Enabled = true; } private void disable_qc_form() { this.listMaj1.Enabled = false; this.listMaj2.Enabled = false; this.listMaj3.Enabled = false; this.listMin1.Enabled = false; this.listMin2.Enabled = false; this.listMin3.Enabled = false; this.listYN.Enabled = false; this.listMaj1.Enabled = false; this.listMaj2.Enabled = false; this.listMaj3.Enabled = false; this.listMin1.Enabled = false; this.listMin2.Enabled = false; this.listMin3.Enabled = false; this.boxComments.Enabled = false; this.boxMajdef1.Enabled = false; this.boxMajdef2.Enabled = false; this.boxMajdef3.Enabled = false; this.boxMindef1.Enabled = false; this.boxMindef2.Enabled = false; this.boxMindef3.Enabled = false; this.boxPallet.Enabled = false; this.boxPulpTemp.Enabled = false; this.boxSamples.Enabled = false; this.lblComments.Enabled = false; this.lblmajdef1.Enabled = false; this.lblmajdef2.Enabled = false; this.lblmajdef3.Enabled = false; this.lblmindef1.Enabled = false; this.lblmindef2.Enabled = false; this.lblmindef3.Enabled = false; this.lblPackageCorrect.Enabled = false; this.lblPalletTag.Enabled = false; this.lblPulpTemp.Enabled = false; this.lblTotSamples.Enabled = false; } } } So I need to be able to call the method to test my first dropdown list. Thank you in advance for your help!!
0
[ 2, 645, 20, 3195, 1736, 19, 13, 7, 3845, 18, 1303, 45, 3095, 2801, 52, 309, 20, 40, 4851, 16, 40, 3095, 9, 7, 800, 3726, 3726, 31, 1967, 1465, 70, 483, 31, 186, 16, 158, 3195, 13, 5, 8294, 1, 1251, 150, 1, 4190, 5, 6, 73, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 viewDidAppear === I need to load some data into a view every time it is shown. The data changes, each time time view is shown, so I figure I can load the data in the method viewDidAppear. Unfortunately, I've found that viewDidAppear is not called each time the view is displayed. The code that displays the view from any other view is.... [self clearView]; [self.view insertSubview:fifthViewController.view atIndex:4]; So I figured I could change it to the following to run viewDidAppear... [[self.view insertSubview:fifthViewController.view atIndex: 4 viewDidAppear:YES]; Unfortunaely, this causes an error "bad receiver type 'void' What do I need to do to insert the subview and also call viewDidAppear?
0
[ 2, 184, 20, 485, 1418, 3052, 22306, 512, 800, 3726, 3726, 31, 376, 20, 6305, 109, 1054, 77, 21, 1418, 352, 85, 32, 25, 1721, 9, 14, 1054, 1693, 15, 206, 85, 85, 1418, 25, 1721, 15, 86, 31, 1465, 31, 92, 6305, 14, 1054, 19, 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...
UIScrollView reverse order positioning from right to left === I have a UIScrollView with UIPageControl and it's working great. the only problem is that the pages are changing from right to left and I want the pages to change from left to right. how can I do that? I've messed the code up twice already without any success. Please help me! :) here is my code: - (void)setupPage { scrollView.delegate = self; [self.scrollView setBackgroundColor:[UIColor blackColor]]; [scrollView setCanCancelContentTouches:NO]; scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite; scrollView.clipsToBounds = YES; scrollView.scrollEnabled = YES; scrollView.pagingEnabled = YES; scrollView.backgroundColor = [UIColor clearColor]; [scrollView setShowsHorizontalScrollIndicator:NO]; [scrollView setShowsVerticalScrollIndicator:NO]; UIButton * btn_level1 = [UIButton buttonWithType:UIButtonTypeCustom]; btn_level1.frame = CGRectMake(60, 26, 200, 200); btn_level1.tag = 101; [btn_level1 addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside]; [btn_level1 setBackgroundImage:[UIImage imageNamed:@"level_image@2x.png"] forState:UIControlStateNormal]; self.pageControl.numberOfPages = 4; [scrollView setContentSize:CGSizeMake(1280, [scrollView bounds].size.height)]; } - (void)scrollViewDidScroll:(UIScrollView *)_scrollView { if (pageControlIsChangingPage) { return; } /* * We switch page at 50% across */ CGFloat pageWidth = _scrollView.frame.size.width; int page = floor((_scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1; pageControl.currentPage = page; } - (void)scrollViewDidEndDecelerating:(UIScrollView *)_scrollView { pageControlIsChangingPage = NO; } - (IBAction)changePage:(id)sender { /* * Change the scroll view */ CGRect frame = scrollView.frame; frame.origin.x = frame.size.width * pageControl.currentPage; frame.origin.y = 0; [scrollView scrollRectToVisible:frame animated:YES]; /* * When the animated scrolling finishings, scrollViewDidEndDecelerating will turn this off */ pageControlIsChangingPage = YES; } - (void)viewDidLoad { [self setupPage]; [super viewDidLoad]; // Do any additional setup after loading the view from its nib. } btw, I've already check and searched for other questions, I found and tried them, but also without any success. Thanks alot.
0
[ 2, 13, 5661, 3862, 8694, 4725, 7006, 389, 649, 68, 37, 193, 20, 225, 800, 3726, 3726, 31, 57, 21, 13, 5661, 3862, 8694, 4725, 29, 13, 5661, 6486, 12898, 17, 32, 22, 18, 638, 374, 9, 14, 104, 1448, 25, 30, 14, 4434, 50, 4226, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Sync Services for ADO.NET Solution for Mobile Devices - ArgumentNullException === I'm trying to create a sync between my mobile and database server. I am following [this tutorial][1] and it get `ArgumentNullException Value can not be null. Parameter name: ServerSyncProvider` in sych() function. Code private void Sync() { Cursor.Current = Cursors.WaitCursor; WebReference.NorthwindCacheSyncService svcProxy = new WebReference.NorthwindCacheSyncService(); Microsoft.Synchronization.Data.ServerSyncProviderProxy syncProxy = new Microsoft.Synchronization.Data.ServerSyncProviderProxy(svcProxy); // Call SyncAgent.Synchronize() to initiate the synchronization process. // Synchronization only updates the local database, not your project's data source. NorthwindCacheSyncAgent syncAgent = new NorthwindCacheSyncAgent(); Microsoft.Synchronization.Data.SyncStatistics syncStats = syncAgent.Synchronize(); // TODO: Reload your project data source from the local database (for example, call the TableAdapter.Fill method). // Show synchronization statistics MessageBox.Show("Changes downloaded: " + syncStats.TotalChangesDownloaded.ToString() + "\r\nChanges Uploaded: " + syncStats.TotalChangesUploaded.ToString()); Cursor.Current = Cursors.Default; } [1]: http://mobileworld.appamundi.com/blogs/andywigley/archive/2008/12/08/building-a-sync-services-for-ado-net-solution-for-mobile-devices.aspx
0
[ 2, 6063, 150, 687, 26, 21, 537, 9, 2328, 4295, 26, 3241, 4690, 13, 8, 5476, 4215, 211, 10066, 872, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 6063, 150, 128, 51, 3241, 17, 6018, 8128, 9, 31, 589, 249, 636, 1565, 29724, 50...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Not binbing path in datagrid (wpf) === type of column in datagrid is combobox, i create List, and list this ok, bit if i write in xaml ItemsSource="{Binding Path=combolist}" items is null my list List<string> combolist = new List<string>(); while (reader.Read()) { combolist.Add(reader.GetString(0)); } why items is null?
0
[ 2, 52, 4511, 8136, 2013, 19, 1054, 16375, 13, 5, 499, 7721, 6, 800, 3726, 3726, 1001, 16, 4698, 19, 1054, 16375, 25, 22621, 5309, 15, 31, 1600, 968, 15, 17, 968, 48, 5854, 15, 1142, 100, 31, 2757, 19, 13, 6791, 8184, 3755, 12097...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
prompt user a message and read input while saving it to a log file === i have shell script that require to do following things: 1) shell script need to store the logs to a log file. 2) shell script need to prompt user with a message and reads the input. Example: cat read-test.sh echo -n "What is your name?" read user_name Executing this script: ./read-test.sh >> read-test.log Expected User prompt: What is your name? rajiv When i execute this script as > ./read-test.sh i get the desired output. but when i execute this script as > ./read-test.sh >> read-test.sh "what is your name?" is saved to read-test.log file which i don't want to. Is there any way where i can show the user with message("what is your name?") and reads input?
0
[ 2, 11443, 4417, 4155, 21, 2802, 17, 1302, 6367, 133, 7599, 32, 20, 21, 6738, 3893, 800, 3726, 3726, 31, 57, 3593, 3884, 30, 4077, 20, 107, 249, 564, 45, 137, 6, 3593, 3884, 376, 20, 1718, 14, 18893, 20, 21, 6738, 3893, 9, 172, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
cocos2d How to update images/selectors in menuitem === I have this part of my game where once a certain state of the level is reached, the "End Game" button turns into the "Next Level" button. How do I change the button and the selector for that? - I am using CCMenuItemImage for this. Furthermore, I have this array of letters (as images) that I display on the screen, and each time the user clicks a button, it shuffles the letters. Note that the letters are in a horizontal position. How do I update the letter positions? Some other notes: - I have a variable that holds the letters in the array, and the function not only does [array shuffle];, it should shuffle the letters according to that as well Thanks for the help guys!
0
[ 2, 22470, 18, 135, 43, 184, 20, 11100, 3502, 118, 3434, 19932, 18, 19, 11379, 2119, 79, 800, 3726, 3726, 31, 57, 48, 141, 16, 51, 250, 113, 382, 21, 1200, 146, 16, 14, 662, 25, 664, 15, 14, 13, 7, 2451, 250, 7, 5167, 2844, 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...
PHP/MYSQL - Mysqli Prepared Statements - Fetch table data and add each row to a local array? === I have a list of various postal information. This data is within a mysql table called "postal_codes". I would like to add each row of this table into a local array for use in a script. The problemt hat I am facing is that I keep getting errors relating to undefined variables within the while loop. Here is the code I have so far: // Get postal info and make into array $postalCodes[] = array(); if ($stmt = $link->prepare("SELECT id, suburb, boxCode, streetCode, townName FROM postal_codes")) { if (!$stmt->execute()) { printf("failed to execute"); } if (!$stmt->bind_result($id, $suburb, $boxCode, $streetCode, $townName)) { printf("failed to bind params"); } if (!$stmt->store_result()) { printf("failed to store result"); } while ($stmt->fetch()) { $postalCodes['id'] += $id; $postalCodes['suburb'] += $suburb; $postalCodes['boxCode'] += $boxCode; $postalCodes['streetCode'] += $streetCode; $postalCodes['townName'] += $townName; } $stmt->close(); } foreach ($postalCodes as $postalCode) { if ($postalCode['boxCode'] == 5850) { printf("{$postalCode['suburb']}"); } } Could someone by chance spot the problem with this code or suggest a way for me to code this procedure in a better way. Any assistance and insight in this regard would be greatly appreciated, thanks!
0
[ 2, 13, 26120, 118, 915, 18, 22402, 13, 8, 51, 18, 1251, 1210, 3268, 9015, 13, 8, 18312, 859, 1054, 17, 3547, 206, 3131, 20, 21, 375, 7718, 60, 800, 3726, 3726, 31, 57, 21, 968, 16, 617, 11680, 676, 9, 48, 1054, 25, 363, 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...
Symfony2: Show IP as string and save IP as INT === I have an Entity in Symfony called Ip and I save my IP address as integer - I use the IP as primary key, too. But when I display and enter the IP in a form or list I want to convert it to a IP, e.g. 127.0.0.1 is saved as 2130706433. I created the forms with the CRUD generator. My entity comes here: <?php namespace IS\ClearanceBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * IS\ClearanceBundle\Entity\Ip */ class Ip { /** * @var bigint $ip */ private $ip; /** * @var integer $high */ private $high; /** * @var string $hoster */ private $hoster; /** * @var datetime $scandate */ private $scandate; /** * @var integer $id */ private $id; /** * @var IS\ClearanceBundle\Entity\Clearance */ private $clearance; public function __construct() { $this->clearance = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Set ip * * @param bigint $ip */ public function setIp($ip) { $this->ip = $ip; } /** * Get ip * * @return bigint */ public function getIp() { return $this->ip; } /** * Set high * * @param integer $high */ public function setHigh($high) { $this->high = $high; } /** * Get high * * @return integer */ public function getHigh() { return $this->high; } /** * Set hoster * * @param string $hoster */ public function setHoster($hoster) { $this->hoster = $hoster; } /** * Get hoster * * @return string */ public function getHoster() { return $this->hoster; } /** * Set scandate * * @param datetime $scandate */ public function setScandate($scandate) { $this->scandate = $scandate; } /** * Get scandate * * @return datetime */ public function getScandate() { return $this->scandate; } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Add clearance * * @param IS\ClearanceBundle\Entity\Clearance $clearance */ public function addClearance(\IS\ClearanceBundle\Entity\Clearance $clearance) { $this->clearance[] = $clearance; } /** * Get clearance * * @return Doctrine\Common\Collections\Collection */ public function getClearance() { return $this->clearance; } } And here is my Controller: <?php namespace IS\ClearanceBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use IS\ClearanceBundle\Entity\Ip; use IS\ClearanceBundle\Form\IpType; /** * Ip controller. * * @Route("/ip") */ class IpController extends Controller { /** * Lists all Ip entities. * * @Route("/", name="ip") * @Template() */ public function indexAction() { $em = $this->getDoctrine()->getEntityManager(); $entities = $em->getRepository('ISClearanceBundle:Ip')->findAll(); return array('entities' => $entities); } /** * Finds and displays a Ip entity. * * @Route("/{id}/show", name="ip_show") * @Template() */ public function showAction($id) { $em = $this->getDoctrine()->getEntityManager(); $entity = $em->getRepository('ISClearanceBundle:Ip')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Ip entity.'); } $deleteForm = $this->createDeleteForm($id); return array( 'entity' => $entity, 'delete_form' => $deleteForm->createView(), ); } /** * Displays a form to create a new Ip entity. * * @Route("/new", name="ip_new") * @Template() */ public function newAction() { $entity = new Ip(); $form = $this->createForm(new IpType(), $entity); return array( 'entity' => $entity, 'form' => $form->createView() ); } /** * Creates a new Ip entity. * * @Route("/create", name="ip_create") * @Method("post") * @Template("ISClearanceBundle:Ip:new.html.twig") */ public function createAction() { $entity = new Ip(); $request = $this->getRequest(); $form = $this->createForm(new IpType(), $entity); $form->bindRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getEntityManager(); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('ip_show', array('id' => $ entity->getId()))); } return array( 'entity' => $entity, 'form' => $form->createView() ); } /** * Displays a form to edit an existing Ip entity. * * @Route("/{id}/edit", name="ip_edit") * @Template() */ public function editAction($id) { $em = $this->getDoctrine()->getEntityManager(); $entity = $em->getRepository('ISClearanceBundle:Ip')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Ip entity.'); } $editForm = $this->createForm(new IpType(), $entity); $deleteForm = $this->createDeleteForm($id); return array( 'entity' => $entity, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), ); } /** * Edits an existing Ip entity. * * @Route("/{id}/update", name="ip_update") * @Method("post") * @Template("ISClearanceBundle:Ip:edit.html.twig") */ public function updateAction($id) { $em = $this->getDoctrine()->getEntityManager(); $entity = $em->getRepository('ISClearanceBundle:Ip')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Ip entity.'); } $editForm = $this->createForm(new IpType(), $entity); $deleteForm = $this->createDeleteForm($id); $request = $this->getRequest(); $editForm->bindRequest($request); if ($editForm->isValid()) { $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('ip_edit', array('id' => $ id))); } return array( 'entity' => $entity, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), ); } /** * Deletes a Ip entity. * * @Route("/{id}/delete", name="ip_delete") * @Method("post") */ public function deleteAction($id) { $form = $this->createDeleteForm($id); $request = $this->getRequest(); $form->bindRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getEntityManager(); $entity = $em->getRepository('ISClearanceBundle:Ip')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Ip entity.' ); } $em->remove($entity); $em->flush(); } return $this->redirect($this->generateUrl('ip')); } private function createDeleteForm($id) { return $this->createFormBuilder(array('id' => $id)) ->add('id', 'hidden') ->getForm() ; } } And here the form: <?php namespace IS\ClearanceBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilder; class IpType extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { $builder ->add('ip') ->add('high') ->add('hoster') ->add('scandate') ->add('clearance','entity', array('class'=>'IS\ClearanceBundle\Entity\Clearance', 'property'=>'id','required'=>false, 'multiple'=>true)) ; } public function getName() { return 'is_clearancebundle_iptype'; } } Thanks for any help!
0
[ 2, 13, 7261, 10229, 93, 135, 45, 298, 15735, 28, 3724, 17, 2079, 15735, 28, 19, 38, 800, 3726, 3726, 31, 57, 40, 9252, 19, 13, 7261, 10229, 93, 227, 15735, 17, 31, 2079, 51, 15735, 3218, 28, 13820, 13, 8, 31, 275, 14, 15735, 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...
Update session within a thread === When i try to refresh a session within a thread,its not getting refreshed.After closing the session and reopening the session,objects are refreshed properly.Why is this happening? Please help me out.
0
[ 2, 11100, 3723, 363, 21, 9322, 800, 3726, 3726, 76, 31, 1131, 20, 24905, 21, 3723, 363, 21, 9322, 15, 7363, 52, 1017, 24905, 69, 9, 5162, 4239, 14, 3723, 17, 21398, 68, 14, 3723, 15, 23793, 18, 50, 24905, 69, 7428, 9, 2256, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Boost mutexes and threads === I have a few singleton classes with some extra functions which are run in separate thread. The structure looks like: class Singleton { private: boost::mutex mMutex; std::vector<std::string> mMessages; public: void AddMessage(const std::string &msg) { mMutex.lock(); mMessages.push_back(msg); mMutex.unlock(); } void Sender() { while (true) { mMutex.lock(); for (size_t i = 0; i < mMessages.size(); ++i) { // Do something with mMessages[i] } mMutex.unlock(); } } }; ... int main() { Singleton *handle boost::thread sender(boost::bind(&Singleton::Sender, handle)); ... app cycle ... } Sometimes it fails with error: terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >' what(): boost::lock_error Aborted What could it be and what's the best why to find out the reason of assert?
0
[ 2, 10419, 20562, 13012, 18, 17, 20396, 800, 3726, 3726, 31, 57, 21, 310, 345, 444, 2684, 29, 109, 2230, 3719, 56, 50, 485, 19, 1725, 9322, 9, 14, 1411, 1879, 101, 45, 718, 345, 444, 13, 1, 932, 45, 10419, 45, 45, 7903, 1706, 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...
Customize column for django-tables as drop down list === I have a table in which I compare the two versions of a selected Data. This data actually has more than one version stored, so in my table I have column as: class ver_compare(tables.Table): new_db = tables.CheckBoxColumn() data = tables.Column() current_rev = tables.Column() next_rev = tables.Column()* Now the last field I want as a each cell to have a drop down list of version to select from, something similar to choicefield. Is there any approach to go along?? Thanks in advance!!
0
[ 2, 5816, 2952, 4698, 26, 3857, 14541, 8, 5924, 18, 28, 2804, 125, 968, 800, 3726, 3726, 31, 57, 21, 859, 19, 56, 31, 11590, 14, 81, 3281, 16, 21, 1704, 1054, 9, 48, 1054, 1121, 63, 91, 119, 53, 615, 8214, 15, 86, 19, 51, 859...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Prevent Controls in ControlTemplate inheriting global Styles (WPF) === I have this generic style for a custom control with this Template. <Style TargetType="{x:Type local:MyType}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:MyType}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> ... </Border> ... if this control is used in a project where is this style globaly set: <Style TargetType="{x:Type Border}"> <Setter Property="Padding" Value="3" /> <Setter Property="VerticalAlignment" Value="Top" /> </Style> Then the Border in the ControlTemplate inherits this style as well (Padding 3 etc.) I don't want to explicitly say Padding = 0 for the Border etc. Is there any way to say the controls in the ControlTemplate not to inhertit these global styles? I cannot set OverrideDefaultStyle, because it is a generic style.
0
[ 2, 2501, 8671, 19, 569, 9577, 6554, 17569, 68, 2062, 6443, 13, 5, 499, 7721, 6, 800, 3726, 3726, 31, 57, 48, 12733, 1034, 26, 21, 5816, 569, 29, 48, 22894, 9, 13, 1, 4381, 2935, 4474, 3726, 7, 1, 396, 45, 4474, 375, 45, 915, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Page Curl download link missing === Im having dificulty finding the download link given here in stockoverflow about android page curl. Just like the iphone animation between activities. They gave me this link: [http://code.google.com/p/android-page-curl/][1] but i cant find the download link. Is this a deadlink? And Im somehow confused in these two link : [http://code.google.com/p/android-page-curl/][2] [https://github.com/harism/android_page_curl/][3] Are they the same? [1]: http://code.google.com/p/android-page-curl/ [2]: http://code.google.com/p/android-page-curl/ [3]: https://github.com/harism/android_page_curl/
1
[ 2, 2478, 14320, 7121, 3508, 2863, 800, 3726, 3726, 797, 452, 926, 1707, 21142, 93, 3007, 14, 7121, 3508, 504, 235, 19, 2070, 2549, 9990, 88, 13005, 2478, 14320, 9, 114, 101, 14, 21024, 6236, 128, 1648, 9, 59, 492, 55, 48, 3508, 45...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Toggle flags on/off with a button in highcharts/highstock === I wondered if anybody would know if it's possible in jQuery to have a button that would show/hide the flags displayed on a highcharts stock chart, such as the one in my jsfiddle here http://jsfiddle.net/hcharge/G7rsh/6/ I'm assuming you'd use something like this $('.on').click(function() { $('flags').toggle('1000', function() { }); }); I'm just not sure how you would reference the flags in the chart? I'd also like the button to toggle class when it is clicked. Any help would be great. Thanks
0
[ 2, 20, 263, 4875, 9318, 27, 118, 1299, 29, 21, 5167, 19, 183, 5433, 38, 18, 118, 4542, 7576, 800, 3726, 3726, 31, 3519, 100, 11181, 83, 143, 100, 32, 22, 18, 938, 19, 487, 8190, 93, 20, 57, 21, 5167, 30, 83, 298, 118, 19522, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Redirect all requests to subdirectory except a few ip addresses === This question attempts to combine knowledge gained from some previous answers on SO, so do not mark as a duplicate unless the answer is meets the all of criteria about to be given. This is what I want to do: <br /> I need to temporarily .htaccess redirect visitors to my site to a clone copy so that I can make modifications on the existing site.<br /> Therefore, I have the following needs:<br /> 1. All users requests /(.*) should be redirected to sub-directory /website/$1 (ie if someone requests /index.php it should go to /website/index.php)<br /> 2. If the user is from one of three specific ips the request should not be redirected, and should go to the file (ie if I request /index.php it should go to /index.php)<br /> 3. Said redirection should also force the use of www (ie requests with or without www, should be redirected to www.example.com/website)<br /> 4. Said redirection should be a temporary redirect of some sorts (the normal site will only be down for a couple of days)<br /> This is my current code: <br /> RewriteEngine on RewriteCond %{HTTP_HOST} ^example\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.example\.com$ RewriteRule ^/?$ "http\:\/\/www\.example\.com\/website\/" [R=301,L] It meets criteria 1,3, and 4. I just need help adjusting it to not redirect the three specific ip addresses. Any thoughts as to how to incorporate #2?
0
[ 2, 302, 14706, 65, 12279, 20, 972, 10197, 93, 1613, 21, 310, 15735, 12636, 800, 3726, 3726, 48, 1301, 3265, 20, 12287, 1918, 2528, 37, 109, 1158, 6709, 27, 86, 15, 86, 107, 52, 943, 28, 21, 19429, 4003, 14, 1623, 25, 5224, 14, 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...
Rendering Liquid Template in Controller === I'm trying to have the "show" action for my pages controller render a Liquid template instead of the normal view. The template itself is stored in the database. This is my show action: def show @organization = Organization.find_by_subdomain(request.subdomain) @template = Liquid::Template.parse(Template.find(@organization.current_template)) @page = @organization.pages.find(params[:id]) respond_to do |format| format.html { render @template.render('page' => @page)} format.json { render json: @page } end end However, it raises this exception: uninitialized constant PagesController::Liquid I'm a RoR newbie, so I'm assuming what's happening is that it's trying to find the Liquid class in the PagesController class, instead of realizing it's a class unto itself. I'm following the (somewhat sparse) instructions [here](https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers) as best I can. What am I doing wrong?
0
[ 2, 15307, 4189, 22894, 19, 9919, 800, 3726, 3726, 31, 22, 79, 749, 20, 57, 14, 13, 7, 9303, 7, 1028, 26, 51, 4434, 9919, 16535, 21, 4189, 22894, 700, 16, 14, 1826, 1418, 9, 14, 22894, 1145, 25, 8214, 19, 14, 6018, 9, 48, 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...
Integrate protocol buffers into WAF === I managed to compile my `.proto` files like this: def build(bld): bld(rule='protoc --cpp_out=. -I.. ${SRC}', source='a.proto b.proto', name='genproto') Seems to work nice, when I make changes to the source files, they are recompiled and so on. But the result would be files called `build/a.pb.cc` and `build/b.pb.cc` which I need to include into my main programs source list. Of course I know how to manually construct them from my protocol buffers file names, but I don't think this is the way to go. Can anyone provide me a hint? Best regards, Philipp
0
[ 2, 18399, 8494, 17497, 18, 77, 3142, 410, 800, 3726, 3726, 31, 1471, 20, 26561, 51, 13, 1, 9, 2740, 262, 1, 6488, 101, 48, 45, 6312, 1895, 5, 6287, 43, 6, 45, 13, 6287, 43, 5, 16154, 3726, 22, 2740, 262, 150, 13, 8, 8, 150, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Deserializing XML where each object has a list of objects === I'm working on a WP7 app which gets and updates data on a web server. If any updates need a response, I get a list of errors that needs to be dealt with, and a list of possible choices for each error. The issue I'm having is assigning each object its appropriate list of choices. As of now I get a list of errors, and another list of all possible choices for all errors. I'd like the error object to contain the list of only its options so I can handle that. So here's an example response: <?xml version="1.0" encoding="utf-8"?> <response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <response_error_dialogs> <error_dialog_list> <error_dialog_choice> <error_dialog_id>1301</error_dialog_id> <error_dialog_message>You have changed the phone number. Select which phone number to make the primary contact number.</error_dialog_message> <error_dialog_title>Phone Number Changed</error_dialog_title> <error_dialog_is_set>false</error_dialog_is_set> <error_dialog_choice_option_list> <error_dialog_choice_option> <error_dialog_choice_option_id>1</error_dialog_choice_option_id> <error_dialog_choice_option_title>Home</error_dialog_choice_option_title> </error_dialog_choice_option> <error_dialog_choice_option> <error_dialog_choice_option_id>2</error_dialog_choice_option_id> <error_dialog_choice_option_title>Mobile</error_dialog_choice_option_title> </error_dialog_choice_option> <error_dialog_choice_option> <error_dialog_choice_option_id>3</error_dialog_choice_option_id> <error_dialog_choice_option_title>Work</error_dialog_choice_option_title> </error_dialog_choice_option> </error_dialog_choice_option_list> </error_dialog_choice> <error_dialog_choice> <error_dialog_id>1303</error_dialog_id> <error_dialog_message>You have changed the account email address. Would you like this to be the new default email?</error_dialog_message> <error_dialog_title>Email Address Changed</error_dialog_title> <error_dialog_is_set>false</error_dialog_is_set> <error_dialog_choice_option_list> <error_dialog_choice_option> <error_dialog_choice_option_id>1</error_dialog_choice_option_id> <error_dialog_choice_option_title>No</error_dialog_choice_option_title> </error_dialog_choice_option> <error_dialog_choice_option> <error_dialog_choice_option_id>2</error_dialog_choice_option_id> <error_dialog_choice_option_title>Yes</error_dialog_choice_option_title> </error_dialog_choice_option> </error_dialog_choice_option_list> </error_dialog_choice> </error_dialog_list> </response_error_dialogs> </response> And here's the classes used: XElement self; public ErrorDialog() { } public ErrorDialog(XElement errorDialog) { self = errorDialog; } public int errorDialogId { get { return (int)(self.Element("error_dialog_id")); } set { } } public string errorDialogMessage { get { return (string)(self.Element("error_dialog_message")); } set { } } public string errorDialogTitle { get { return (string)(self.Element("error_dialog_title")); } set { } } public bool errorDialogIsSet { get { return (bool)(self.Element("error_dialog_is_set")); } set { } } public List<ErrorDialogChoice> errorDialogChoice { get { return (List<ErrorDialogChoice>)(errorDialogChoice); } set { } } public int errorDialogSelectedOption { get { return (int)(self.Element("error_dialog_selected_option")); } set { } } XElement self; public ErrorDialogChoice() { } public ErrorDialogChoice(XElement errorDialogChoice) { self = errorDialogChoice; } public int errorDialogChoiceOptionId { get { return (int)(self.Element("error_dialog_choice_option_id")); } set { } } public string errorDialogChoiceOptionTitle { get { return (string)(self.Element("error_dialog_choice_option_title")); } set { } } And here's how I'm parsing it: XElement response = XElement.Parse(data); ErrorDialog[] dialogs = response.Element("response_error_dialogs").Element("error_dialog_list").Elements("error_dialog_choice").Select(e => new ErrorDialog(e)).ToArray(); ErrorDialogChoice[] edChoices = response.Element("response_error_dialogs").Element("error_dialog_list").Element("error_dialog_choice").Element("error_dialog_choice_option_list").Elements("error_dialog_choice_option").Select(e => new ErrorDialogChoice(e)).ToArray(); So with this example, the first error_dialog_choice object will have a List containing 3 error_dialog_choice_option objects, the second has the two error_dialog_choice_option objects, and any more that may come back. Any help is appreciated. Thanks.
0
[ 2, 1746, 106, 2815, 3335, 23504, 113, 206, 3095, 63, 21, 968, 16, 3916, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 13, 13790, 465, 4865, 56, 3049, 17, 16779, 1054, 27, 21, 2741, 8128, 9, 100, 186, 16779, 376, 21, 1627, 15, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Setting alignment of title text in a JMenu component === Simply put, JMenu.setHorizontalAligment(SwingConstants.CENTER) does nothing and the text is still left-aligned (using the Windows LAF). Is there any method of aligning the text in a menu header (not the JMenuItem - the JMenus themselves)? I'm using JDK1.7. What my JMenuBar with its JMenus looks like currently: ![Current JMenuBar with JMenus (and a single JMenuItem][1] [1]: http://i.stack.imgur.com/iqm2M.png
0
[ 2, 2697, 12448, 16, 581, 1854, 19, 21, 487, 755, 291, 5912, 800, 3726, 3726, 1659, 442, 15, 487, 755, 291, 9, 18, 6268, 5985, 6931, 13864, 12828, 1130, 5, 18, 3546, 29639, 18, 9, 12641, 6, 630, 626, 17, 14, 1854, 25, 174, 225, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
.htaccess let's you view .jpg while prevents from viewing others === RewriteEngine On RewriteBase / RewriteCond %{HTTP_COOKIE} !CookieName= [NC] RewriteRule .* http://www.domain.com/index.html [R,L] This is how my .htaccess file looks like. My problem: If cookie is not set, it still lets you view .jpg files (what I don't want to happen)(maybe other image files too, dunno), while it redirects to index.html from .docx, .pptx, .sfk etc. So I want to know how to force redirect on accessing images (at least .jpg, .png, .gif)?
0
[ 2, 13, 9, 9020, 20604, 408, 22, 18, 42, 1418, 13, 9, 12851, 263, 133, 2501, 18, 37, 11244, 654, 800, 3726, 3726, 27891, 16847, 27, 27891, 8436, 13, 118, 27891, 1126, 43, 13, 11881, 1, 21127, 1, 716, 17391, 1, 13, 187, 716, 17391...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Smack "No Response From Server". Not sure why am i getting this error === I have an openfire server setted up on my local machine. I am trying to connect this server, but getting "No response from server" error. Not sure why? I have spark client on the same machine that is getting connected to the server successfully. Can you please help me out to identify the problem? Below is the log details that might help 07-30 01:01:02.570: I/System.out(424): 01:01:02 AM SENT (1156489960): <stream:stream to="192.168.1.3" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"> 07-30 01:01:02.593: I/System.out(424): 01:01:02 AM RCV (1156489960): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from= 07-30 01:01:02.593: I/System.out(424): 01:01:02 AM RCV (1156489960): "praleeds" id="39bc1246" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></startt 07-30 01:01:02.593: I/System.out(424): 01:01:02 AM RCV (1156489960): ls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism> 07-30 01:01:02.593: I/System.out(424): 01:01:02 AM SENT (1156489960): <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/> 07-30 01:01:02.617: I/System.out(424): 01:01:02 AM RCV (1156489960): ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><metho 07-30 01:01:02.617: I/System.out(424): 01:01:02 AM RCV (1156489960): d>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-re 07-30 01:01:02.623: I/System.out(424): 01:01:02 AM RCV (1156489960): gister"/></stream:features><proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/> 07-30 01:01:02.835: W/System.err(424): java.security.KeyStoreException: KeyStore jks implementation not found 07-30 01:01:02.835: W/System.err(424): at java.security.KeyStore.getInstance(KeyStore.java:134) 07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.ServerTrustManager.<init>(ServerTrustManager.java:61) 07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived(XMPPConnection.java:839) 07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:268) 07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44) 07-30 01:01:02.835: W/System.err(424): at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:71) 07-30 01:01:11.612: W/ActivityManager(59): Launch timeout has expired, giving up wake lock! 07-30 01:01:12.038: W/ActivityManager(59): Activity idle timeout for HistoryRecord{45072328 com.android.notifications/.NotificationsActivity} 07-30 01:01:17.284: D/dalvikvm(235): GC_EXPLICIT freed 156 objects / 11400 bytes in 228ms 07-30 01:01:17.653: I/System.out(424): 01:01:17 AM SENT (1156489960): <iq id="Q41Dw-0" to="praleeds" type="set"><query xmlns="jabber:iq:register"><password>praleed</password><email>praleedsuvarna@gmail.com</email><username>praleedsuvarna</username><name>Praleed Suvarna</name></query></iq> 07-30 01:01:22.344: D/dalvikvm(260): GC_EXPLICIT freed 45 objects / 2176 bytes in 239ms 07-30 01:01:22.693: V/Praleed-Notifications(424): No Response from Server; Host : 192.168.1.3; User : null 07-30 01:01:22.924: I/ActivityManager(59): Displayed activity com.android.notifications/.NotificationsActivity: 21292 ms (total 21292 ms) 07-30 01:01:23.545: I/global(424): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 07-30 01:01:23.545: I/global(424): Default buffer size used in BufferedWriter constructor. It would be better to be explicit if an 8k-char buffer is required. 07-30 01:01:23.553: I/System.out(424): 01:01:23 AM SENT (1156489960): <stream:stream to="praleeds" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"> 07-30 01:01:23.573: I/System.out(424): 01:01:23 AM SENT (1156489960): <presence id="Q41Dw-1" type="unavailable"></presence> 07-30 01:01:23.573: I/System.out(424): 01:01:23 AM SENT (1156489960): </stream:stream> 07-30 01:01:23.799: W/System.err(424): java.io.IOException: Read error: Failure in SSL library, usually a protocol error 07-30 01:01:23.803: W/System.err(424): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeread(Native Method) 07-30 01:01:23.803: W/System.err(424): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.access$300(OpenSSLSocketImpl.java:55) 07-30 01:01:23.803: W/System.err(424): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:542) 07-30 01:01:23.803: W/System.err(424): at java.io.InputStreamReader.read(InputStreamReader.java:275) 07-30 01:01:23.813: W/System.err(424): at java.io.BufferedReader.fillBuf(BufferedReader.java:155) 07-30 01:01:23.813: W/System.err(424): at java.io.BufferedReader.read(BufferedReader.java:348) 07-30 01:01:23.813: W/System.err(424): at org.jivesoftware.smack.util.ObservableReader.read(ObservableReader.java:42) 07-30 01:01:23.813: W/System.err(424): at org.kxml2.io.KXmlParser.peek(KXmlParser.java:931) 07-30 01:01:23.813: W/System.err(424): at org.kxml2.io.KXmlParser.peekType(KXmlParser.java:589) 07-30 01:01:23.813: W/System.err(424): at org.kxml2.io.KXmlParser.nextImpl(KXmlParser.java:333) 07-30 01:01:23.813: W/System.err(424): at org.kxml2.io.KXmlParser.next(KXmlParser.java:1385) 07-30 01:01:23.823: W/System.err(424): at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:326) 07-30 01:01:23.823: W/System.err(424): at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44) 07-30 01:01:23.823: W/System.err(424): at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:71) Thanks in advance.
0
[ 2, 17417, 13, 7, 251, 1627, 37, 8128, 7, 9, 52, 562, 483, 589, 31, 1017, 48, 7019, 800, 3726, 3726, 31, 57, 40, 368, 5929, 8128, 309, 1427, 71, 27, 51, 375, 1940, 9, 31, 589, 749, 20, 6379, 48, 8128, 15, 47, 1017, 13, 7, 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...
Java server safety communication with HTTP request-response === I'm making a server-client application(in java) with Entity-s from DB, and facadeRest classes from entity classes. The server and client use HTTP request for communication. I need a solution which provides me, that the server could answer only to MY clients. (I dont want to someone manipulate my server status, and the database with some requests). First I tried that: the client always send a JSON object(the communication based on json), so I figured it out, that if the client put his ID into the json, and also a String, which made from the id with some algorithm, then the server could make the same algorithm with the id, and can comapre the to hash string. if not same, the server's answer is null. And i also can put the other stuffs to the json: @POST @Path("create") @Consumes({"application/json"}) @Produces("text/plain") public String signUp(JSONObject json) { if (!validate(json)) { return null; //not validated client }else{ //... } } and the JSON is: {"name":"asd" "hash": "lbfgakl"} But the method automatically want to convert the json to an entity (I think), or some other reason, I get this error msg: "Unrecognized field "name" (Class org.codehaus.jettison.json.JSONObject), not marked as ignorable" So tried somehow ignore the fields, but I couldnt. I also can make an Entity, not from DB, then a facadeREST class from this entity, and the entity coult have the ID, hash, and the other fields. When i got the entity after the HTTP request, i can take the datas and use free. But I find this solution ugly.. Then I tried to put some information to the request header(for example md5 hashstring from the forwarded datas), but I could not read it from the facadeREST class's method. Can someone help me to use one of this solutions, or show me a better one? Thanks!
0
[ 2, 8247, 8128, 2108, 3291, 29, 7775, 3772, 8, 99, 18, 8782, 870, 800, 3726, 3726, 31, 22, 79, 544, 21, 8128, 8, 150, 18513, 38, 3010, 5, 108, 8247, 6, 29, 9252, 8, 18, 37, 13, 9007, 15, 17, 7224, 11466, 2684, 37, 9252, 2684, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 words of same spell with dfferent length? === i have a table in which i added english dictionary words. now i have some records that are seems to be duplicate but its not since the length of the string differs. for example a word 'aaron' is repeated twice in my table. but when i use this query select id,word,char_length(word) from my_table; its displaying as id word char_length 7 aaron 5 12 aaron 6 how the char_length changes for the same word? wat i can do to remove one word which exceeds length by 1
0
[ 2, 81, 715, 16, 205, 4762, 29, 13, 43, 6866, 2291, 1476, 60, 800, 3726, 3726, 31, 57, 21, 859, 19, 56, 31, 905, 486, 9186, 715, 9, 130, 31, 57, 109, 742, 30, 50, 2206, 20, 44, 19429, 47, 82, 52, 179, 14, 1476, 16, 14, 3724...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Removing a fragment not working === I want to remove a fragment and show a toast when I click a textView. My code shows the toast, but doesn't remove the fragment. **My method:** public void hide(View view) { My_frag myFrag= new My_frag(); FragmentTransaction transaction = getSupportFragmentManager() .beginTransaction(); transaction.remove(myFrag); transaction.commit(); Toast.makeText(getApplicationContext(), "Hello", Toast.LENGTH_LONG) .show(); } **My_frag class:** public class My_frag extends android.support.v4.app.Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.my_frag_layout, container, false); } }
0
[ 2, 9096, 21, 14847, 52, 638, 800, 3726, 3726, 31, 259, 20, 4681, 21, 14847, 17, 298, 21, 13865, 76, 31, 10840, 21, 1854, 4725, 9, 51, 1797, 1285, 14, 13865, 15, 47, 1437, 22, 38, 4681, 14, 14847, 9, 13, 1409, 915, 2109, 45, 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...
Android: Save Image Byte Array to .net webservice and retrieve it === I have a .net ASMX webservice that I'm consuming using the ksoap2 library. In the service, I first save the user image and later retrieve it. However, once I retrieve it, the byte array is intact, but the BitmapFactory is unable to decode it and returns a null. **To convert to byte array:** Bitmap viewBitmap = Bitmap.createBitmap(imageView.getWidth(), imageView.getHeight(), Bitmap.Config.ARGB_8888); ByteArrayOutputStream bos = new ByteArrayOutputStream(); viewBitmap.compress(CompressFormat.PNG, 0 /* ignored for PNG */, bos); byte[] bitmapdata = bos.toByteArray(); The webservice accepts the bytearray in the byte[] format. **To convert the array into bitmap:** byte[] blob= info.get(Main.KEY_THUMB_BYTES).getBytes(); Bitmap bmp=BitmapFactory.decodeByteArray(blob,0,blob.length); // Return null :( imageView.setImageBitmap(bmp); From partial-analysis, it appears that the byte array does not change. Then why does decoding return null? Is there a better to save an image and pass it through a webservice? I didn't analyze the whole byte array, so I'm guessing it might've changed a bit. Any thoughts? Many thanks!
0
[ 2, 13005, 45, 2079, 1961, 34, 591, 7718, 20, 13, 9, 2328, 2741, 11449, 17, 11917, 32, 800, 3726, 3726, 31, 57, 21, 13, 9, 2328, 28, 79, 396, 2741, 11449, 30, 31, 22, 79, 13, 17601, 568, 14, 680, 656, 2552, 135, 1248, 9, 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...
Virtual file backed by memory (reverse MMAP)? === mmap() is used to create memory region that is backed by file system. However, I want the reverse: a file that is backed by memory. Is that possible? I have a legacy static library (meaning it's not possible to change it) can only open a local file. I can't change it to use a redirected fd, or a stdin (because pipe does not support seek) I want the file content to be streamed from a Windows share (CIFS/SMB). Is it possible to create a virtual file on local file system with fake size and when the legacy static library access any part of the file(seek or read, no write), we handle it by doing a fetch from CIFS/SMB and return to the legacy library (just like handling a page fault)? Then legacy library would not notice any difference... Mounting the CIFS/SMB share is not possible due to permission issue. Assume the environment is POSIX, however, OS specific advice is welcomed as well.
0
[ 2, 6599, 3893, 6334, 34, 1912, 13, 5, 99, 9453, 1620, 2552, 6, 60, 800, 3726, 3726, 1620, 2552, 5, 6, 25, 147, 20, 1600, 1912, 632, 30, 25, 6334, 34, 3893, 329, 9, 207, 15, 31, 259, 14, 7006, 45, 21, 3893, 30, 25, 6334, 34, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 strange error with strcpy and even stranger solution === I'm creating a program to open .txt files in a given directory, I have an array with all the absolute paths of the files inside the directory in question and I'm creating a function to extract and return the name of the files, the fuction is written as follows: <code> char *name(char *string) { int i = strlen(string); char *aux; while(string[i-1] != '/'){ i--; } strcpy(aux, &string[i]); return aux; } </code> The above fuction is giving a Segmentation Fault error, but if I add the following line " int j = 0;" before the declaration of aux the mistake is gone, the new and working code is <code> char *name(char *string) { int i = strlen(string); int j = 0; char *aux; while(string[i-1] != '/'){ i--; } strcpy(aux, &string[i]); return aux; } </code> input: C:\test\a.txt output: a.txt Why the addition of "int j = 0;" solves the problem? I'm stuck with that and can't continue because i don't know if this inconsistency might lead to bigger problems later, i'm thinking about writing my own function to copy the strings, but before that I really want to understand that error.
0
[ 2, 272, 2578, 7019, 29, 354, 5453, 6448, 17, 166, 7704, 4295, 800, 3726, 3726, 31, 22, 79, 2936, 21, 625, 20, 368, 13, 9, 38, 396, 38, 6488, 19, 21, 504, 16755, 15, 31, 57, 40, 7718, 29, 65, 14, 7070, 12074, 16, 14, 6488, 57...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Xcode 4.2 using StoryBoard to present a ViewController === The new way of presenting a viewcontroller using the StoryBoard. UIStoryboard* secondStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; UINavigationController* secondViewController = [secondStoryboard instantiateViewControllerWithIdentifier:@"Connect"]; [self presentViewController: secondViewController animated:YES completion: NULL]; The old way of presenting the controller Connect is like this Connect *connect = [[[Connect alloc] initWithNibName:@"Connect" bundle:nil] autorelease]; [self presentViewController:connect animated:YES completion:NULL]; NSString *userid; userid=@"123"; [connect setID:userid]; I want to call the setID function of the connect controller in the Storyboard way, how can I do that? Seems like I don't get an instance of Connect controller directly.
0
[ 2, 13, 7760, 993, 9375, 268, 9, 135, 568, 609, 2806, 20, 734, 21, 1418, 12898, 1252, 800, 3726, 3726, 14, 78, 161, 16, 12310, 21, 1418, 12898, 1252, 568, 14, 609, 2806, 9, 13, 5661, 4416, 2806, 2483, 153, 4416, 2806, 800, 636, 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...
Objective C: calculator app - currentNumber = currentNumber * 10 + digit; === I am reading "Programming in Objective-C" 4th Ed. by Stephen G. Kochan. In the book, there is a sample code for creating a Calculator application for the iPhone. I understand the code, at least 90% of it. - There is a Fraction class that has methods to store fraction objects and that describe how to perform different basic fraction arithmetic operations - In addition to that, there is a calculator class that runs the appropriate methods from the Fraction class depending on whether the user is trying to sum, divide etc. The view controller has the following method for when the user presses a number in the interface: -(IBAction)clickDigit:(UIButton *)sender { int digit = sender.tag; //sender or the argument inthis case is the button [self processDigit:digit]; } As you see this method is now called: -(void) processDigit:(int)digit { currentNumber = currentNumber * 10 + digit; [displayString appendString: [NSString stringWithFormat:@"%i", digit]]; display.text = displayString; } My ONLY question (and probably the one with the most simple answer) is: Why is currentNumber always multiplied by 10? The value of currentNumber is always 0 by the time the compiler enters the method above (I verified this using the debugger in XCode) so i dont get why we even have to multiply it by 10. I did delete that multiplication and the results are incorrect, i just cannot figure out why yet. Thank you
0
[ 2, 7038, 272, 45, 28539, 4865, 13, 8, 866, 16299, 800, 866, 16299, 1637, 332, 2754, 15611, 73, 800, 3726, 3726, 31, 589, 1876, 13, 7, 19746, 3863, 19, 7038, 8, 150, 7, 268, 96, 13, 69, 9, 34, 2526, 489, 9, 12148, 210, 9, 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...
custom event for dragging 2D object in WPF === I'm trying to create WPF application where I can drag on 2D object using hand gesture... Currently I've already make hand gesture recognition using emgucv (opencv wrapper in C#), here's the snapshot ![snapshot][1] so the idea is that when the object is on the middle of the hand(centroid position) and the hand do some specific gesture, it will fire an drag event on the object... [1]: http://i.stack.imgur.com/5ujbl.png What I've done : 1. find out where the object position(x,y coordinate) relative to the hand 2. Hand tracking and gesture recognition (using emgu CV) my problem is that I don't know how to make custom event for this situation, the tutorial I've found only explain how to drag object using mouse events.. any solution for this problem? Any help would be much appreciated! thanks
0
[ 2, 5816, 807, 26, 13052, 172, 43, 3095, 19, 619, 7721, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 619, 7721, 3010, 113, 31, 92, 5501, 27, 172, 43, 3095, 568, 224, 7222, 9, 9, 9, 871, 31, 22, 195, 614, 233, 224, 7222, 3514, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
A server with the specified hostname could not be found === When I try to submit my app on the Appstore through xCode I got this error. "A server with the specified hostname could not be found." Is this temporary error at apple or something to do with Xcode? is any one else facing this problem?
0
[ 2, 21, 8128, 29, 14, 9931, 2015, 7259, 110, 52, 44, 216, 800, 3726, 3726, 76, 31, 1131, 20, 12298, 51, 4865, 27, 14, 4865, 16828, 120, 993, 9375, 31, 330, 48, 7019, 9, 13, 7, 58, 8128, 29, 14, 9931, 2015, 7259, 110, 52, 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...
Qt delegate module of a QTreeView, delegate non-top widgets only? === I use Qt's delegate module for a QTreeView, but this works for both top-level widget and non-top ones, is it possible to control this behavior ? Just delegate for non-top widgets only
0
[ 2, 2593, 38, 11300, 12613, 16, 21, 2593, 8101, 4725, 15, 11300, 538, 8, 3880, 4807, 43, 3060, 18, 104, 60, 800, 3726, 3726, 31, 275, 2593, 38, 22, 18, 11300, 12613, 26, 21, 2593, 8101, 4725, 15, 47, 48, 693, 26, 156, 371, 8, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1...
"No resource identifier found for attribute 'showAsAction' in package 'android'" === I am attempting to update my android application to look better for tablets running Honeycomb. As such, I am targeting version 11 of the SDK (my minSdkVersion = 4). This adds the Honeycomb theme to my app, making it look better. However, I have no way to access my menu options. So, I am attempting to add my menu items as an action bar item with the following in the file in my /res/menu/ folder: android:showAsAction="ifRoom|withText" However, I get the following error: No resource identifier found for attribute 'showAsAction' in package 'android' I tried altering my minSdkVersion number to 11 to see if it would work, but no luck. Any ideas? Thanks! Aaron
0
[ 2, 13, 7, 251, 6577, 25570, 216, 26, 35, 14755, 13, 22, 9303, 472, 8645, 22, 19, 6030, 13, 22, 290, 18524, 22, 7, 800, 3726, 3726, 31, 589, 6314, 20, 11100, 51, 13005, 3010, 20, 361, 574, 26, 20175, 946, 29806, 9, 28, 145, 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...
Android Action Bar - With Tabs === I am trying to create a tab action bar on android but I seem to face problems when following tutorials. They usually will have resources which are not shown of which I am also not too sure what are they an causing me not being able to compile the project like in the tutorial. can someone kindly help me out with this. thanks.
0
[ 2, 13005, 1028, 748, 13, 8, 29, 6523, 18, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 6523, 1028, 748, 27, 13005, 47, 31, 2260, 20, 276, 1716, 76, 249, 29724, 18, 9, 59, 951, 129, 57, 2566, 56, 50, 52, 1721, 16, 56, 31, 589...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Is broadcast intent broadcasted when the application is launched? === Is the broadcast receiver started when the application is started or do you have to call it in the onCreate of your activity?
0
[ 2, 25, 1992, 6936, 1992, 69, 76, 14, 3010, 25, 1601, 60, 800, 3726, 3726, 25, 14, 1992, 6264, 373, 76, 14, 3010, 25, 373, 54, 107, 42, 57, 20, 645, 32, 19, 14, 27, 6037, 1373, 16, 154, 2358, 60, 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, 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...
Character Replacement: Break-Lines === I have a few areas in an application of mine that I have <textarea> tags so users can enter messages to one another. A problem with some messages had been plaguing me for a while, but I could never figure out what the problem was. I would open up all the messages at once and save them in hidden <div> tags. When the user 'opened' the message, the data from the <div> tag would be gathered and shown in a lightbox for the user. For some reason, it wouldn't open some of those messages. One of my users noticed that if you used a line-break (using 'shift+enter') in the message, it would break the Javascript when it tried to retrieve the message. Since this is only a problem when trying to read the message, I should be able to replace it when the message is sent in the first place. How can I detect a line-break and replace it when it is submitted? Any help would be much appreciated! str_replace(???,"/n",$string)
0
[ 2, 925, 4610, 45, 1442, 8, 7939, 800, 3726, 3726, 31, 57, 21, 310, 924, 19, 40, 3010, 16, 1114, 30, 31, 57, 13, 1, 11969, 17760, 1, 3383, 18, 86, 3878, 92, 2830, 7561, 20, 53, 226, 9, 21, 1448, 29, 109, 7561, 41, 74, 6568, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Sitemesh and OpenSessionInViewFIlter/Interceptor what's the deal? === I'm really, really frustrated by my project and configuration right now as after so much reseach online, post in stackoverflow [here][1] and [here][2] i'm still hitting the block for this famous lazyinitialization exception.I did implement either the Filter or Interceptor.I did separated the dispatcher applicationconfig from the rest.There is no cross component scan between the config application context and the dispatcher one. And yet still having this exception.Am really out of options right now and clock is ticking above my head. Is there any issue with sitemesh and OpenSessionInViewFilter or OpenSessionInViewInterceptor ? thanks for reading this and helping out [1]: http://stackoverflow.com/questions/9311741/how-to-configure-dispatcherservlet-and-contextloaderlistener-in-order-to-give-wa [2]: http://stackoverflow.com/questions/9274949/hibernate-spring-session-still-closed-before-retrieval-of-child-collection-even
0
[ 2, 689, 79, 6134, 17, 8965, 160, 5991, 108, 4725, 11924, 815, 118, 24171, 98, 22, 18, 14, 1183, 60, 800, 3726, 3726, 31, 22, 79, 510, 15, 510, 10645, 34, 51, 669, 17, 8091, 193, 130, 28, 75, 86, 212, 10719, 14322, 2087, 15, 67...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 wallPaper Programmatically in ios === Hello I am new bee to the iphone apps development is there a way to get the user selected wallpapers from settings programmatically?. i wanna create a call in progress screen so i want to set the user selected wallpaper as the background image
0
[ 2, 164, 28129, 625, 6732, 1326, 19, 13, 7760, 800, 3726, 3726, 10975, 31, 589, 78, 12092, 20, 14, 21024, 4865, 18, 522, 25, 80, 21, 161, 20, 164, 14, 4155, 1704, 28129, 18, 37, 12410, 625, 6732, 1326, 60, 9, 31, 11024, 1600, 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, 0...
Hide/show Actionbar when tap on MapView in Android === I want to realize functionality of Android actionbar like in Gallery App on tablets. One tap on map - actionbar hides, second tap on map - actionbar shows. But I want still zoom map with two fingers and double click. Please help me with this, I spend a lot of time on this problem.
0
[ 2, 3077, 118, 9303, 1028, 1850, 76, 5526, 27, 2942, 4725, 19, 13005, 800, 3726, 3726, 31, 259, 20, 4007, 18548, 16, 13005, 1028, 1850, 101, 19, 2246, 4865, 27, 20175, 9, 53, 5526, 27, 2942, 13, 8, 1028, 1850, 3077, 18, 15, 153, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 create uml class diagram and notations by programming? === Package model = UMLFactory.eINSTANCE.createPackage(); model.setName("MyPackage"); Class cls = model.createOwnedClass("MyClass", false); I created some uml2 models by code above, now I want to create a class diagram and some notations for package/class etc. How can I do this by programming? (We can initialize class diagram for .uml by uml2tools in eclipse, but what's the API for it?) Thanks a lot.
0
[ 2, 184, 20, 1600, 13, 723, 255, 718, 14161, 17, 15591, 18, 34, 3143, 60, 800, 3726, 3726, 6030, 1061, 800, 13, 723, 255, 17455, 93, 9, 12897, 384, 2416, 9, 6037, 1373, 8573, 1303, 5, 6, 73, 1061, 9, 3554, 7259, 5, 7, 915, 8573...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 uniquely identify a place on Google Places API === i'm developing a web app that uses the Google Maps JavaScript API v3. I've this problem: I would to save a place in my DB using Places Autocomplete. The user, type a place into a text field and then, after a call vs the API, my application should check if a the city of the selected place exists in my DB; if true, return the city ID, otherwise insert the city and return last inserted ID. To do this, I need to uniquely identify a place. Any suggestions? Thanks. David.
0
[ 2, 184, 20, 23703, 5808, 21, 209, 27, 8144, 1489, 21, 2159, 800, 3726, 3726, 31, 22, 79, 3561, 21, 2741, 4865, 30, 2027, 14, 8144, 6867, 8247, 8741, 21, 2159, 566, 240, 9, 31, 22, 195, 48, 1448, 45, 31, 83, 20, 2079, 21, 209, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 - Trigger - Concat - Failed === I have this trigger and produces the error: The table not exist "lecturas.TablaX" Begin # Declaramos Variables Declare MasterX,TablaX, varchar(100); #Determinamos Master Set MasterX = LPAD(New.Master, 3, 0); #Armar Ruta Set TablaX = Concat ( 'lecturas.M',MasterX); # Insertar datos en la tabla Lecturas INSERT INTO TablaX (Id) Values (New.Master); End
0
[ 2, 51, 18, 22402, 13, 8, 7286, 13, 8, 1065, 5782, 13, 8, 1702, 800, 3726, 3726, 31, 57, 48, 7286, 17, 6700, 14, 7019, 45, 14, 859, 52, 3182, 13, 7, 14439, 3031, 18, 9, 536, 10754, 396, 7, 2348, 6926, 121, 12078, 9220, 18, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...