Daily Archives

Articles indexed Sunday December 9 2012

Page 8/12 | < Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >

  • Manually force touch points to reset in Windows 8?

    - by loyalpenguin
    Hi I developed a HTML5/JAVASCRIPT app that is supported using advertisement for the Win8 store. I just by chance happened to notice that if you touch the screen, drag your finger over the advertisement, and release your finger on top of the advertisement that the specific touch is not released and instead when you touch again it registers as a separate touch. This has caused my app to behave expectantly when the user interacts with the app using touch. I wanted to know if it was possible to force the touches to reset so that when the user touches the screen again it is always using "Touch(0)".

    Read the article

  • Not getting return value

    - by scottO
    I am trying to get a return value and it keeps giving me an error. I am trying to grab the "roleid" after the username has been validated by sending it the username-- I can't figure out what I am doing wrong? public string ValidateRole(string sUsername) { string matchstring = "SELECT roleid FROM tblUserRoles WHERE UserName='" + sUsername +"'"; SqlCommand cmd = new SqlCommand(matchstring); cmd.Connection = new SqlConnection("Data Source=(local);Initial Catalog="mydatabase";Integrated Security=True"); cmd.Connection.Open(); cmd.CommandType = CommandType.Text; SqlDataAdapter sda = new SqlDataAdapter(); DataTable dt = new DataTable(); sda.SelectCommand = cmd; sda.Fill(dt); string match; if (dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { match = row["roleid"].ToString(); return match; } } else { match = "fail"; return match; } }

    Read the article

  • Java - Incrementing through IP addresses in String format

    - by Matt
    I'm new to java and i'm trying to find a way of incrementing through an user input IP address range. For example from 192.168.0.1 to 192.168.0.255. However the way my application works at the moment is the take the from and to ip addresses as a String. Is there a way I can increment through all the ip addresses the user input from and to? Hope this makes sense and please dont flame me, I have looked for an answer!

    Read the article

  • Bug in malloc or mine?

    - by Martin
    Is this my bug or a bug/assertion fail in malloc itself? alloc.c:2451: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)-bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) = (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)-size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed. libstdc++6:amd64 4.7.2-2ubuntu1 gcc 4.7.2 ubuntu 12.10/64bit

    Read the article

  • new to lists on python

    - by user1762229
    This is my current code: while True: try: mylist = [0] * 7 for x in range(7): sales = float(input("Sales for day:")) mylist[x] = sales if sales < 0: print ("Sorry,invalid. Try again.") except: print ("Sorry, invalid. Try again.") else: break print (mylist) best = max(sales) worst = min(sales) print ("Your best day had", best, "in sales.") print ("Your worst day had", worst, "in sales.") When I run it I get this: Sales for day:-5 Sorry,invalid. Try again. Sales for day:-6 Sorry,invalid. Try again. Sales for day:-7 Sorry,invalid. Try again. Sales for day:-8 Sorry,invalid. Try again. Sales for day:-9 Sorry,invalid. Try again. Sales for day:-2 Sorry,invalid. Try again. Sales for day:-5 Sorry,invalid. Try again. [-5.0, -6.0, -7.0, -8.0, -9.0, -2.0, -5.0] Traceback (most recent call last): File "C:/Users/Si Hong/Desktop/HuangSiHong_assign9_part.py", line 45, in <module> best = max(sales) TypeError: 'float' object is not iterable I am not quite sure how to code it so that, the lists do NOT take in negative values, because I only want values 0 or greater. I am not sure how to solve the TypeError issue so that the min and max values will print as in my code My last issue is, if I want to find the average value of the seven inputs that an user puts in, how should I go about this in pulling the values out of the lists Thank you so much

    Read the article

  • which one of these is an example of coercion

    - by user1890210
    I have been pondering a multiple choice question on coercion. One of the 4 examples a,b,c or d is an example of coercion. I narrowed it down to A or B. But I am having a problem choosing between the two. Cane someone please explain why one is coercion and one isn't. A) string s="tomat"; char c='o'; s=s+c; I thought A could be correct because we have two different types, character and string, being added. Meaning that c is promoted to string, hence coercion. B) double x=1.0; double y=2.0; int i=(int)(x+y); I also thought B was the correct answer because the double (x+y) is being turned into a int to be placed in i. But I thought this could be wrong because its being done actively through use of (int) rather than passively such as "int i = x + y" I'll list the other two options, even though I believe that neither one is the correct answer C) char A=0x20; A = A << 1 | 0x01; cout << A << endl; D) double x=1.0; double y=x+1; return 0; I'm not just looking for an answer, but an explanation. I have read tons of things on coercion and A and B both look like the right answer. So why is one correct and the other not.

    Read the article

  • Hashing Function for Map C++

    - by Josh
    I am trying to determine a hash function which takes an input (i, k) and determines a unique solution. The possible inputs for (i, k) range from 0 to 100. Consider each (i, k) as a position of a node in a trinomial tree. Ex: (0, 0) can diverge to (1, 1) (1, 0) (1, -1). (1, 1) can diverge to (2, 2) (2, 1) (2, 0). Sample given here: http://www.google.com/imgres?imgurl=http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/stfhtmlimg1156.gif&imgrefurl=http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/stfhtmlnode41.html&h=413&w=416&sz=4&tbnid=OegDZu-yeVitZM:&tbnh=90&tbnw=91&zoom=1&usg=__9uQWDNYNLV14YioWWbrqPgfa3DQ=&docid=2hhitNyRWjI_DM&hl=en&sa=X&ei=xAfFUIbyG8nzyAHv2YDICg&ved=0CDsQ9QEwAQ I am using a map map <double, double> hash_table I need a key value to be determined from pairs (i, k) to hash to to value for that (i, k) So far I was only able to come up with linear functions such as: double Hash_function(int i, int k) { //double val = pow(i, k) + i; //return (val % 4294967296); return (i*3.1415 + k*i*9.12341); } However, I cannot determine a unique key with a certain (i, k). What kind of functions can I use to help me do so?

    Read the article

  • Why pseudo-elements :before and :after appear in front of my DIV element and not behind?

    - by Dim13i
    I have a DIV element with this given class: .slideshow { background: white; width: 700px; height: 300px; padding:10px; margin: 0 auto; position: relative; box-shadow: 0px 0px 5px grey, 0px 10px 20px rgba(0,0,0,.1) inset; } I define those two pseudo-elements (:before and :after): .slideshow:before, .slideshow:after { content: " "; background: green; width: 50%; height: 50%; position: absolute; z-index: -10; } My problem is that those two pseudo-elements appear in front of my DIV and not behind. Is there any specific reason for this behaviour? Here is an example: EXAMPLE The Javascript part is a bit messy but i'm still working on it. Also I've noticed that if I delete all the JS part I don't have anymore this problem, but I don't think there is anything in the code that should modify the slideshow DIV SOLVED: The problem is in the javascript part where I have: $('.slideshow').css('-webkit-transform', 'rotate(0deg)'); Removing this line solved the problem. I guess that pseudo-elements :before and :after are not compatible with the property transform.

    Read the article

  • Time Complexities of recursive algorithms

    - by Peter
    Whenever I see a recursive solution, or I write recursive code for a problem, it is really difficult for me to figure out the time complexity, in most of the cases I just say its exponential? How is it exponential actually? How people say it is 2^n, when it is n!, when it is n^n or n^k. I have some questions in mind, let say find all permutations of a string (O(n!)) find all sequences which sum up to k in an array (exponential, how exactly do I calculate). Find all subsets of size k whose sum is 0 (will k come somewhere in complexity , it should come right?). Can any1 help me how to calculate the exact complexity of such questions, I am able to wrote code for them , but its hard understanding the exact time complexity.

    Read the article

  • make Ruby script run once a second

    - by Matt Hintzke
    I have a ruby script that needs to run about 1 time a second. What I am doing is using a ruby script to keep track of modifications of files in a directory. I want the script to run once a second so that the modifications are updated in "live" time. Basically, I want my script to do the same kind of thing as running "top" on a unix shell. Where the screen is updated every second or so. Is there an equivalent to setInterval in ruby like there is in javascript? Thanks

    Read the article

  • Backbone.js: How to utilize router.navigate to manipulate browser history?

    - by Xavier_Ex
    I am writing something like a registration process containing several steps, and I want to make it a single-page like system so after some studying Backbone.js is my choice. Every time the user completes the current step they will click on a NEXT button I create and I use the router.navigate method to update the url, as well as loading the content of the next page and doing some fancy transition with javascript. Result is, URL is updated which the page is not refreshed, giving a smooth user experience. However, when the user clicks on the back button of the browser, the URL gets updated to that of a previous step, but the content stays the same. My question is through what way I can capture such an event and currently load the content of the previous step and present that to the user? Or even better, can I rely on browser cache to load that previously loaded page? EDIT: in particular, I'm trying something like mentioned in this article.

    Read the article

  • change height in Android 2.2 LinearLayout in code

    - by Niro
    Im trying to change height of Layouts through the code without success. I've tried all of the examples i saw here and other site and my app just keep shutting down. xml code: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/main_lay" android:orientation="vertical" tools:context=".MainActivity" > <LinearLayout android:id="@+id/layout_add" > </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="50dp" android:background="@color/green"> <ImageView android:layout_width="fill_parent" android:contentDescription="@string/desc" android:layout_height="45dp" android:layout_gravity="center_vertical|left" android:scaleType="fitStart" android:background="@color/orange" android:src="@drawable/logo" > </ImageView> </LinearLayout> </LinearLayout> Java code: main_layout=(LinearLayout)findViewById(R.id.main_lay); main_layout.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT)); main_layout.setBackgroundResource(R.color.white); layout_add = (LinearLayout) findViewById(R.id.layout_add); layout_add.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT,50 )); layout_add.setBackgroundResource(R.color.dark_grey); I cant understand what im doing wrong. I've tried different ways to fix it. The Backround setting is working fine. Thank you guys Niro This is the Logcat 12-09 16:12:39.007: E/AnalyticsSDKTest.cpp(6338): Time w/ UTC Offset: 2012-12-09 12-09 16:16:14.517: E/ActivityManager(121): fail to set top app changed! 12-09 16:16:14.547: E/InputDispatcher(121): channel '4056b9c8 com.nirosadvice.converter/com.nirosadvice.converter.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8 12-09 16:16:14.547: E/InputDispatcher(121): channel '4056b9c8 com.nirosadvice.converter/com.nirosadvice.converter.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 12-09 16:16:18.071: E/PVWmdrmProxy(5716): binder died for component: ComponentInfo{com.pv.wmdrmservice/com.pv.wmdrmservice.PVWmdrmService} 12-09 16:16:18.161: E/AndroidRuntime(18911): FATAL EXCEPTION: main 12-09 16:16:18.161: E/AndroidRuntime(18911): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nirosadvice.converter/com.nirosadvice.converter.MainActivity}: java.lang.RuntimeException: Binary XML file line #1: You must supply a layout_width attribute. 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1821) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1842) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.ActivityThread.access$1500(ActivityThread.java:132) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.os.Handler.dispatchMessage(Handler.java:99) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.os.Looper.loop(Looper.java:150) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.ActivityThread.main(ActivityThread.java:4263) 12-09 16:16:18.161: E/AndroidRuntime(18911): at java.lang.reflect.Method.invokeNative(Native Method) 12-09 16:16:18.161: E/AndroidRuntime(18911): at java.lang.reflect.Method.invoke(Method.java:507) 12-09 16:16:18.161: E/AndroidRuntime(18911): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-09 16:16:18.161: E/AndroidRuntime(18911): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-09 16:16:18.161: E/AndroidRuntime(18911): at dalvik.system.NativeStart.main(Native Method) 12-09 16:16:18.161: E/AndroidRuntime(18911): Caused by: java.lang.RuntimeException: Binary XML file line #1: You must supply a layout_width attribute. 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:491) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3684) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:3764) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.widget.FrameLayout$LayoutParams.<init>(FrameLayout.java:457) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:423) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:47) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 12-09 16:16:18.161: E/AndroidRuntime(18911): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:231) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.Activity.setContentView(Activity.java:1715) 12-09 16:16:18.161: E/AndroidRuntime(18911): at com.nirosadvice.converter.MainActivity.onCreate(MainActivity.java:87) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072) 12-09 16:16:18.161: E/AndroidRuntime(18911): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1785) 12-09 16:16:18.161: E/AndroidRuntime(18911): ... 11 more Thanks After Iv'e added the attributes to the XML - this is what i'm getting : CatLog: 12-09 16:42:33.168: E/AndroidRuntime(19065): FATAL EXCEPTION: main 12-09 16:42:33.168: E/AndroidRuntime(19065): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.widget.LinearLayout.measureVertical(LinearLayout.java:360) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.view.View.measure(View.java:8526) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.view.View.measure(View.java:8526) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.view.View.measure(View.java:8526) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.view.ViewRoot.performTraversals(ViewRoot.java:902) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.view.ViewRoot.handleMessage(ViewRoot.java:1957) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.os.Handler.dispatchMessage(Handler.java:99) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.os.Looper.loop(Looper.java:150) 12-09 16:42:33.168: E/AndroidRuntime(19065): at android.app.ActivityThread.main(ActivityThread.java:4263) 12-09 16:42:33.168: E/AndroidRuntime(19065): at java.lang.reflect.Method.invokeNative(Native Method) 12-09 16:42:33.168: E/AndroidRuntime(19065): at java.lang.reflect.Method.invoke(Method.java:507) 12-09 16:42:33.168: E/AndroidRuntime(19065): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-09 16:42:33.168: E/AndroidRuntime(19065): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-09 16:42:33.168: E/AndroidRuntime(19065): at dalvik.system.NativeStart.main(Native Method) 12-09 16:42:39.023: E/AnalyticsSDKTest.cpp(6338): Time w/ UTC Offset: 2012-12-09 21:42:39-05:00 12-09 16:42:49.013: E/AndroidRuntime(19095): FATAL EXCEPTION: main 12-09 16:42:49.013: E/AndroidRuntime(19095): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.widget.LinearLayout.measureVertical(LinearLayout.java:360) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.view.View.measure(View.java:8526) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.view.View.measure(View.java:8526) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.view.View.measure(View.java:8526) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.view.ViewRoot.performTraversals(ViewRoot.java:902) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.view.ViewRoot.handleMessage(ViewRoot.java:1957) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.os.Handler.dispatchMessage(Handler.java:99) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.os.Looper.loop(Looper.java:150) 12-09 16:42:49.013: E/AndroidRuntime(19095): at android.app.ActivityThread.main(ActivityThread.java:4263) 12-09 16:42:49.013: E/AndroidRuntime(19095): at java.lang.reflect.Method.invokeNative(Native Method) 12-09 16:42:49.013: E/AndroidRuntime(19095): at java.lang.reflect.Method.invoke(Method.java:507) 12-09 16:42:49.013: E/AndroidRuntime(19095): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-09 16:42:49.013: E/AndroidRuntime(19095): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-09 16:42:49.013: E/AndroidRuntime(19095): at dalvik.system.NativeStart.main(Native Method) 12-09 16:44:00.913: E/AndroidRuntime(19148): FATAL EXCEPTION: main 12-09 16:44:00.913: E/AndroidRuntime(19148): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.widget.LinearLayout.measureVertical(LinearLayout.java:360) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.view.View.measure(View.java:8526) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.view.View.measure(View.java:8526) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.view.View.measure(View.java:8526) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.view.ViewRoot.performTraversals(ViewRoot.java:902) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.view.ViewRoot.handleMessage(ViewRoot.java:1957) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.os.Handler.dispatchMessage(Handler.java:99) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.os.Looper.loop(Looper.java:150) 12-09 16:44:00.913: E/AndroidRuntime(19148): at android.app.ActivityThread.main(ActivityThread.java:4263) 12-09 16:44:00.913: E/AndroidRuntime(19148): at java.lang.reflect.Method.invokeNative(Native Method) 12-09 16:44:00.913: E/AndroidRuntime(19148): at java.lang.reflect.Method.invoke(Method.java:507) 12-09 16:44:00.913: E/AndroidRuntime(19148): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-09 16:44:00.913: E/AndroidRuntime(19148): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-09 16:44:00.913: E/AndroidRuntime(19148): at dalvik.system.NativeStart.main(Native Method) 12-09 16:44:02.935: E/InputDispatcher(121): channel '4056b9c8 com.nirosadvice.converter/com.nirosadvice.converter.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8 12-09 16:44:02.935: E/InputDispatcher(121): channel '4056b9c8 com.nirosadvice.converter/com.nirosadvice.converter.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 12-09 16:45:25.075: E/AndroidRuntime(19210): FATAL EXCEPTION: main 12-09 16:45:25.075: E/AndroidRuntime(19210): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.widget.LinearLayout.measureVertical(LinearLayout.java:360) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.view.View.measure(View.java:8526) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.view.View.measure(View.java:8526) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.view.View.measure(View.java:8526) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.view.ViewRoot.performTraversals(ViewRoot.java:902) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.view.ViewRoot.handleMessage(ViewRoot.java:1957) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.os.Handler.dispatchMessage(Handler.java:99) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.os.Looper.loop(Looper.java:150) 12-09 16:45:25.075: E/AndroidRuntime(19210): at android.app.ActivityThread.main(ActivityThread.java:4263) 12-09 16:45:25.075: E/AndroidRuntime(19210): at java.lang.reflect.Method.invokeNative(Native Method) 12-09 16:45:25.075: E/AndroidRuntime(19210): at java.lang.reflect.Method.invoke(Method.java:507) 12-09 16:45:25.075: E/AndroidRuntime(19210): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-09 16:45:25.075: E/AndroidRuntime(19210): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-09 16:45:25.075: E/AndroidRuntime(19210): at dalvik.system.NativeStart.main(Native Method) 12-09 16:50:34.507: E/AndroidRuntime(19358): FATAL EXCEPTION: main 12-09 16:50:34.507: E/AndroidRuntime(19358): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.widget.LinearLayout.measureVertical(LinearLayout.java:360) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.view.View.measure(View.java:8526) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.view.View.measure(View.java:8526) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.view.View.measure(View.java:8526) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.view.ViewRoot.performTraversals(ViewRoot.java:902) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.view.ViewRoot.handleMessage(ViewRoot.java:1957) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.os.Handler.dispatchMessage(Handler.java:99) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.os.Looper.loop(Looper.java:150) 12-09 16:50:34.507: E/AndroidRuntime(19358): at android.app.ActivityThread.main(ActivityThread.java:4263) 12-09 16:50:34.507: E/AndroidRuntime(19358): at java.lang.reflect.Method.invokeNative(Native Method) 12-09 16:50:34.507: E/AndroidRuntime(19358): at java.lang.reflect.Method.invoke(Method.java:507) 12-09 16:50:34.507: E/AndroidRuntime(19358): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-09 16:50:34.507: E/AndroidRuntime(19358): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-09 16:50:34.507: E/AndroidRuntime(19358): at dalvik.system.NativeStart.main(Native Method) Third try - after changing the Frame to Linear : 12-09 17:42:39.076: E/AnalyticsSDKTest.cpp(6338): Time w/ UTC Offset: 2012-12-09 22:42:39-05:00 12-09 17:55:44.141: E/ActivityManager(121): Fix ANR:broadcast when App died 12-09 17:55:44.722: E/AndroidRuntime(19469): FATAL EXCEPTION: main 12-09 17:55:44.722: E/AndroidRuntime(19469): java.lang.ClassCastException: android.view.ViewGroup$LayoutParams 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.widget.LinearLayout.measureVertical(LinearLayout.java:360) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.widget.LinearLayout.onMeasure(LinearLayout.java:309) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.view.View.measure(View.java:8526) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.view.View.measure(View.java:8526) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.widget.FrameLayout.onMeasure(FrameLayout.java:250) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.view.View.measure(View.java:8526) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.view.ViewRoot.performTraversals(ViewRoot.java:902) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.view.ViewRoot.handleMessage(ViewRoot.java:1957) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.os.Handler.dispatchMessage(Handler.java:99) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.os.Looper.loop(Looper.java:150) 12-09 17:55:44.722: E/AndroidRuntime(19469): at android.app.ActivityThread.main(ActivityThread.java:4263) 12-09 17:55:44.722: E/AndroidRuntime(19469): at java.lang.reflect.Method.invokeNative(Native Method) 12-09 17:55:44.722: E/AndroidRuntime(19469): at java.lang.reflect.Method.invoke(Method.java:507) 12-09 17:55:44.722: E/AndroidRuntime(19469): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-09 17:55:44.722: E/AndroidRuntime(19469): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-09 17:55:44.722: E/AndroidRuntime(19469): at dalvik.system.NativeStart.main(Native Method)

    Read the article

  • Join using combined conditions on one join table

    - by Nathan Wienert
    I have join a table joining songs to genres. The table has a 'source' column that's used to identify where the genre was found. Genres are found from blogs, artists, tags, and posts. So, songs | song_genre | genres id | song_id, source, genre_id | id What I want to build is a song SELECT query that works something like this, given I already have a genre_id: IF exists song_genre with source='artist' AND a song_genre with source='blog' OR exists song_genre with source='artist' AND a song_genre with source='post' OR exists song_genre with source='tag' I'm was going to do it by doing a bunch of joins, but am sure I'm not doing it very well. Using Postgres 9.1.

    Read the article

  • BASH - How to retrieve rows from a file from #SOF to #EOF

    - by Charlie
    How to retrieve rows from a file from #SOF to #EOF in source.sh #SOF "Lorem ipsum dolor sit amet" "Vivamus pretium enim" "Est accumsan enim magnis" #EOF #SOF "Eleifend tincidunt id justo" "Tellus ut tincidunt vel ac a orci" "Sapien Nullam Sed nunc" "Vestibulum est accumsan enim" #EOF #SOF "Consequat mauris mollis montes" #EOF I need to get 3 files in target_1.sh "Lorem ipsum dolor sit amet" "Vivamus pretium enim" "Est accumsan enim magnis" in target_2.sh "Eleifend tincidunt id justo" "Tellus ut tincidunt vel ac a orci" "Sapien Nullam Sed nunc" "Vestibulum est accumsan enim" in target_3.sh "Consequat mauris mollis montes" Tell someone how to do it? thank you for your help

    Read the article

  • Windows batch file timing bug

    - by elbillaf
    I've used %time% for timing previously - at least I think I have. I have this weird IF NOT "%1" == "" ( echo Testing: %1 echo Start: %time% sqlcmd -S MYSERVER -i test_import_%1.sql -o "test_%1%.log" sleep 3 echo End: %time% ) I run this, and it prints: Testing: pm Start: 13:29:45.30 End: 13:29:45.30 In this case, my sql code is failing (different reason), but I figure the sleep 3 should make the time increment by 3 at least. Any ideas? tx, tff

    Read the article

  • In Python, is there a way to call a method on every item of an iterable? [closed]

    - by Thane Brimhall
    Possible Duplicate: Is there a map without result in python? I often come to a situation in my programs when I want to quickly/efficiently call an in-place method on each of the items contained by an iterable. (Quickly meaning the overhead of a for loop is unacceptable). A good example would be a list of sprites when I want to call draw() on each of the Sprite objects. I know I can do something like this: [sprite.draw() for sprite in sprite_list] But I feel like the list comprehension is misused since I'm not using the returned list. The same goes for the map function. Stone me for premature optimization, but I also don't want the overhead of the return value. What I want to know is if there's a method in Python that lets me do what I just explained, perhaps like the hypothetical function I suggest below: do_all(sprite_list, draw)

    Read the article

  • Unable to call WMP's controls.play() function in VisualBasic

    - by A.J.
    I have the following code: http://pastebin.com/EgjbzqA2 which is basically just a stripped down version of http://www.dreamincode.net/forums/topic/57357-mymusic-player/. I want the program to play one file repeatedly, however, this function doesn't work for some reason. The program plays each file once and then stops. Private Sub Player3_PlayStateChange(ByVal NewState As Integer) Handles Player3.PlayStateChange Static Dim PlayAllowed As Boolean = True Select Case CType(NewState, WMPLib.WMPPlayState) Case WMPLib.WMPPlayState.wmppsReady If PlayAllowed Then Player3.controls.play() End If Case WMPLib.WMPPlayState.wmppsMediaEnded ' Start protection (without it next wouldn't play PlayAllowed = False ' Play track Player3.controls.play() ' End Protection PlayAllowed = True updatePlayer() End Select End Sub

    Read the article

  • Rogue PropertyChanged notifications from ViewModel

    - by user1886323
    The following simple program is causing me a Databinding headache. I'm new to this which is why I suspect it has a simple answer. Basically, I have two text boxes bound to the same property myString. I have not set up the ViewModel (simply a class with one property, myString) to provide any notifications to the View for when myString is changed, so even although both text boxes operate a two way binding there should be no way that the text boxes update when myString is changed, am I right? Except... In most circumstances this is true - I use the 'change value' button at the bottom of the window to change the value of myString to whatever the user types into the adjacent text box, and the two text boxes at the top, even although they are bound to myString, do not change. Fine. However, if I edit the text in TextBox1, thus changing the value of myString (although only when the text box loses focus due to the default UpdateSourceTrigger property, see reference), TextBox2 should NOT update as it shouldn't receive any updates that myString has changed. However, as soon as TextBox1 loses focus (say click inside TextBox2) TextBox2 is updated with the new value of myString. My best guess so far is that because the TextBoxes are bound to the same property, something to do with TextBox1 updating myString gives TextBox2 a notification that it has changed. Very confusing as I haven't used INotifyPropertyChanged or anything like that. To clarify, I am not asking how to fix this. I know I could just change the binding mode to a oneway option. I am wondering if anyone can come up with an explanation for this strange behaviour? ViewModel: namespace WpfApplication1 { class ViewModel { public ViewModel() { _myString = "initial message"; } private string _myString; public string myString { get { return _myString; } set { if (_myString != value) { _myString = value; } } } } } View: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplication1" Title="MainWindow" Height="350" Width="525"> <Window.DataContext> <local:ViewModel /> </Window.DataContext> <Grid> <!-- The culprit text boxes --> <TextBox Height="23" HorizontalAlignment="Left" Margin="166,70,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" Text="{Binding Path=myString, Mode=TwoWay}" /> <TextBox Height="23" HorizontalAlignment="Left" Margin="166,120,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" Text="{Binding Path=myString, Mode=TwoWay}"/> <!--The buttons allowing manual change of myString--> <Button Name="changevaluebutton" Content="change value" Click="ButtonUpdateArtist_Click" Margin="12,245,416,43" Width="75" /> <Button Content="Show value" Height="23" HorizontalAlignment="Left" Margin="12,216,0,0" Name="showvaluebutton" VerticalAlignment="Top" Width="75" Click="showvaluebutton_Click" /> <Label Content="" Height="23" HorizontalAlignment="Left" Margin="116,216,0,0" Name="showvaluebox" VerticalAlignment="Top" Width="128" /> <TextBox Height="23" HorizontalAlignment="Left" Margin="116,245,0,0" Name="changevaluebox" VerticalAlignment="Top" Width="128" /> <!--simply some text--> <Label Content="TexBox1" Height="23" HorizontalAlignment="Left" Margin="99,70,0,0" Name="label1" VerticalAlignment="Top" Width="61" /> <Label Content="TexBox2" Height="23" HorizontalAlignment="Left" Margin="99,118,0,0" Name="label2" VerticalAlignment="Top" Width="61" /> </Grid> </Window> Code behind for view: namespace WpfApplication1 { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { ViewModel viewModel; public MainWindow() { InitializeComponent(); viewModel = (ViewModel)this.DataContext; } private void showvaluebutton_Click(object sender, RoutedEventArgs e) { showvaluebox.Content = viewModel.myString; } private void ButtonUpdateArtist_Click(object sender, RoutedEventArgs e) { viewModel.myString = changevaluebox.Text; } } }

    Read the article

  • Asp MVC - "The Id field is required" validation message on Create; Id not set to [Required]

    - by Dann
    This is happening when I try to create the entity using a Create style action in Asp.Net MVC 2. The POCO has the following properties: public int Id {get;set;} [Required] public string Message {get; set} On the creation of the entity, the Id is set automatically, so there is no need for it on the Create action. The ModelState says that "The Id field is required", but I haven't set that to be so. Is there something automatic going on here? EDIT - Reason Revealed The reason for the issue is answered by Brad Wilson via Paul Speranza in one of the comments below where he says (cheers Paul): You're providing a value for ID, you just didn't know you were. It's in the route data of the default route ("{controller}/{action}/{id}"), and its default value is the empty string, which isn't valid for an int. Use the [Bind] attribute on your action parameter to exclude ID. My default route was: new { controller = "Customer", action = "Edit", id = " " } // Parameter defaults EDIT - Update Model technique I actually changed the way I did this again by using TryUpdateModel and the exclude parameter array asscoiated with that. [HttpPost] public ActionResult Add(Venue collection) { Venue venue = new Venue(); if (TryUpdateModel(venue, null, null, new[] { "Id" })) { _service.Add(venue); return RedirectToAction("Index", "Manage"); } return View(collection); }

    Read the article

  • Using Wildcard SSL Certificates on IIS 7

    - by The Official Microsoft IIS Site
    The other day I was helping someone who was trying to configure a wildcard certificate on their Windows Cloud Server . Their server was running Windows 2008 R2 server using IIS 7. The were technically savvy and knew how to configure site’s on their own and install a regular SSL certificate but they were stuck trying to get a wildcard certificate configured properly. They had quite a few site’s configured using subdomains such as support.domain.com, mail.domain.com, login.domain.com, etc. To tighten...(read more)

    Read the article

  • My Upcoming Talk at South Florida&rsquo;s ITPalooza 2012 - NuGet for Open Source and Enterprise Environments

    - by Sam Abraham
    I am very excited to be speaking at IT Palooza next week. As this event’s audience will span professionals working in different facets of Information Technology, I chose to speak on NuGet, an essential tool for any Microsoft Stack developer, as the topic can be of value to managers, architects, IT personnel, as well as developers. For more information on ITPalooza, please visit: http://itpalooza.e2mktg.com/ To register please visit: http://www.fladotnet.com/Reg.aspx?EventID=627   Below are the abstract and speaker bio: Leveraging NuGet for Open Source and Enterprise Environments NuGet is an open source package management system for .NET and Visual Studio that makes it easy to add, update, or remove external libraries in a .Net Project. In this session, we will be covering how NuGet makes open source libraries easily discoverable and usable. We will then move to demonstrate "NuGet for the Enterprise" as we setup a local library repository and configure NuGet to ensure external library versioning is consistent among project developers. Speakers: Sam Abraham is a Microsoft Certified Professional, Microsoft Certified Technology Specialist (MCTS ASP.Net 3.5, 4.0 and Silverlight 4) and Certified ScrumMaster (CSM) striving to leverage proven technology solutions to produce cost-effective, quality software that meets customer needs, timelines and budgets. He is currently a member of the Software Engineering Team at SISCO, the leader in maritime security solutions with customers including Princess, Carnival, and Royal Caribbean Cruise Lines as well as the US Coast Guard. A strong believer in learning through sharing and the value of community fellowship, Sam has been actively involved in the local community as leader of the West Palm Beach Developers' Group, volunteer board member at the International Association for All IT Architects South Florida Chapter (IASA), and former volunteer at the South Florida Chapter of the Project Management Institute (PMI).

    Read the article

  • Amazing Video - Watch the speech, humor, vision, belief, spontaneity

    - by Manish Agrawal
    Most amazing part of this video is the sense of humor of this gentleman from Lunds University..How learned he must have been at this age, to put examples, new technologies, vision, geo-politics and so many things mixed so nicely on the fly and still give a clear message with humor..About Steve: what a man, in 1985 he was saying these things... as if he did a time travel to 2010 and then was explaining, how computers will influence humankind..  wow..

    Read the article

  • Personal DNS server and fallback outside home

    - by Jens
    I have my own DNS server at home to access local names, and that is working fine. Then I have my laptop, now obviously my laptop leaves the home now and then, therefore it accesses different nets outside my home, and my DNS server is not accessible there... So I figured that I would just add Google as secondary DNS... But actually, when I do that, then suddenly I can't access my local stuff (at home that is, obviously), like my laptop is getting a quicker response from Google's DNS or something, because it can't find anything on the addresses I use locally. If I then remove the secondary DNS, and keeps my own, then it works fine again... So do I somehow need to seperate what DNS's to use on what nets? I already use sepperate DNS settings when I connect using my 3G modem, but when I use hotspots it seems to use the same settings regardless (at least in the train), also can it differ wired connections?... Is there another solution?

    Read the article

  • Server IP must be a LAN IP (Port Forwarding Netgear Router)? [closed]

    - by rphello101
    I'm trying to set up a server (Apache) on my computer (fairly new to it). As I understand it, for it to be accessible to other computers, I need to forward port 80. When I try to forward the port though, I get the error: Server IP must be a LAN IP. I noticed in ipconfig that my default gateway is different than my wireless router. My computer is not hardwired, not on WiFi. Furthermore, I do not, at this point, have a static IP. I read that it should still work with a dynamic IP until it changes. Any ideas on what I can do? I'm using Windows 7 in case it matters.

    Read the article

  • How to write a ProxyPass rule to go from HTTPS to HTTP in IIRF

    - by Keith Nicholas
    I have a server which is running a web app that self serves HTTP. I'm wanting to use IIS6 (on the same server) to provide a HTTPS layer to this web app. From what I can tell doing a reverse proxy will allow me to do this. IIRF seems like the tool to do this job. There are no domain names involved.... its all ip numbers. So I think I want :- https:<ipnumber>:5001 to send all its requests to the same server but on a different port and use HTTP ( not exposed to the net ) http:<ipnumber>:5000 but not sure how to go about it with IIRF, I'm not entirely sure how to write the rules? I think I need to make a virtual web app on 5001 using HTTPS? then add a rules file.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >