exception

ASP.net MVC Routing Throws Exceptions as Normal Behavour?

旧时模样 提交于 2020-01-03 05:19:12
问题 I was debugging my current project (ASP.net MVC 1.0 project) and stumbled upon slightly disturbing behavour. It seems that when the router is hunting for a referenced partial view aka <%Html.RenderPartial("AccountListControl", ViewData["AccountList"]); %> It cycles through it's default locations until it finds the correct spot. So it checks "Views\Shared\AccountListControl" and checks "Views\Home\AccountListControl" etc Once it finds a match - all is good. Bad locations are identified by the

Animation target not specified issue - Silverlight storyboards

你。 提交于 2020-01-03 04:56:04
问题 Having some real head scratching going on here as I can't seem to think why I am getting the Animation target not specified error. I create a static class for dishing out storyboards of lots of little fires "burning". I then create as many of those fires as the user wants and assign a new storyboard to it, all in Csharp. I then begin then storyboard, but as I say, I keep getting this error and I can't seem why. Here is the storyboard creating class, and when I try to call it. public static

Combining isset and is_null fails when checking undefined object property

僤鯓⒐⒋嵵緔 提交于 2020-01-03 04:54:06
问题 I'm trying to combine isset and is_null in one function for ease of use My approach: class sys { public static function is_null(&$variable) { // if it's not set if (!isset($variable)) { return true; } // if array if (is_array($variable)) { return (boolean) (count($variable) < 1); } // if string return (boolean) (strlen($variable) < 1); } } The problem I'm having when i use it within an object is following exception: ErrorException [ Notice ]: Indirect modification of overloaded property xxx

What could be the cause of “java.lang.IllegalStateException: get field slot from row 0 col 0 failed”

老子叫甜甜 提交于 2020-01-03 04:53:06
问题 I have an SQL query running on an 'sqlite' database that is throwing this exception: "java.lang.IllegalStateException: get field slot from row 0 col 0 failed" when I call: db.rawQuery( "SELECT data FROM session_data WHERE session_id = ?", new String[] { String.format("%d", session_id) } ); if (!cursor.moveToFirst()) return; bytes[] bytes = cursor.getBlob(0); The column exists, and if I log in using adb shell sqlite3 /path/to/database.db I can successfully execute the same query. The resulting

Android NetworkOnMainThreadException when calling Url.OpenStream

谁说我不能喝 提交于 2020-01-03 04:36:06
问题 I get this exception when running my code on emulator (Android 4.0.3 / API 15). While opening a stream it will throw an exception. Error-message is null . try { String adress = "xxx"; URL url = new URL(adress); InputSource source = new InputSource(url.openStream()); } catch (Exception e) { (new TextView).setText("Error: "+e.getMessage()); } URL is still working with the emulator (in browser). I have cleaned the project. Also Internet connection is allowed: <uses-permission android:name=

Exception: Application identity is not set

浪子不回头ぞ 提交于 2020-01-03 04:17:08
问题 I'm having this exception when trying to use any of the Deployment members like for example I try in this simple code: Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load MsgBox(If(My.Application.Deployment.IsFirstRun, "Yes", "No")) End Sub End Class Exception message: Application identity is not set The exception occurs in debugging and also in release, in VS2012, targeting FW 4.0 in a Winforms. I've read here: Application identity not set

Programmatically Add Exception to windows vista firewall

痞子三分冷 提交于 2020-01-03 03:25:09
问题 Is there any way to programmatically add an .exe file to the exception list for the Windows Vista firewall to allow it to run normally? I'm using VC++. 回答1: Yes - if you take a look at the WindowsFirewallAddApp method here, it should give you some ideas how to do it. 回答2: I don't know for certain about the Vista firewall, but I would defeinitely excpect that it is a violation of the security of any computer to allow programmatic access to firewall exception lists. I would be very surprised if

Can't connect to remote SQL server in C#

好久不见. 提交于 2020-01-03 03:22:13
问题 I created a database on freesqldatabase.com and was in the process of writing a C# script to connect to it and I cannot seem to get it to connect successfully. I think the issue is in the connection string, but I'm not sure what the problem is. I've been trying to get advice from documentation, but I haven't been able to fix it. My connection method is below: Note: connAddr = sql3.freesqldatabase.com Note: port = 3306 public static void Connect(string connAddr, int port) { CloseConnection();

Elasticsearch queries on “empty index”

你离开我真会死。 提交于 2020-01-03 02:34:25
问题 in my application I use several elasticsearch indices, which will contain no indexed documents in their initial state. I consider that can be called "empty" :) The document's mapping is correct and working. The application also has a relational database that contain entities, that MIGHT have documents associated in elasticsearch. In the initial state of the appliation it is very common that there are only entities without documents, so not a single document has been indexed, therefore "empty

parsing Json File with gson: MalformedJsonException

末鹿安然 提交于 2020-01-03 01:42:13
问题 I want to read a string which is formated like a JSON-File and print it on screen. Therefore I am useing the GSON-Library. Everytime I want to compile I get an Exception in thread "main" com.google.gson.JsonSyntaxException Error My Code looks like this public class Test { public static void main(String... args) throws Exception { String json = "{" + "'tag_name' : 'M mit Mbrunnen'," + "'tag_id' : 'de_bw_xx_mstall'," + "'tag_description': 'false'," + "'tag_latitude': '42.704895'," + "'tag