Search Results

Search found 305 results on 13 pages for 'philip baker'.

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

  • Is this __import__ functionality correct?

    - by Jason Baker
    I have a package named jiva_tasks, which I'm trying to import via celery (using the CELERY_IMPORTS attribute of celeryconfig. The import statement that celery is using is this: __import__(module, [], [], ['']) Oddly enough, when this syntax is used, the module gets imported twice, once as jiva_tasks and another time as jiva_tasks. (with a period at the end). Now, chances are good that celery should be passing in globals rather than an empty list, but this seems broken to me. It seems odd that even if given the wrong arguments, __import__ would import something that isn't a valid python module name. I know that the way to fix this is to pass in globals, but I want to understand why I'm getting this result. Is this a bug, or is there something I don't understand about how __import__ is working? Update: It also seems to be working fine if I use importlib.

    Read the article

  • for loop with count from array, limit output? PHP

    - by Philip
    print '<div id="wrap">'; print "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">"; for($i=0; $i<count($news_comments); $i++) { print ' <tr> <td width="30%"><strong>'.$news_comments[$i]['comment_by'].'</strong></td> <td width="70%">'.$news_comments[$i]['comment_date'].'</td> </tr> <tr> <td></td> <td>'.$news_comments[$i]['comment'].'</td> </tr> '; } print '</table></div>'; $news_comments is a 3 diemensional array from mysqli_fetch_assoc returned from a function elsewhere, for some reason my for loop returns the total of the array sets such as [0][2] etc until it reaches the max amount from the counted $news_comments var which is a return function of LIMIT 10. my problem is if I add any text/html/icons inside the for loop it prints it in this case 11 times even though only array sets 1 and 2 have data inside them. How do I get around this? My function query is as follows: function news_comments() { require_once '../data/queries.php'; // get newsID from the url $urlID = $_GET['news_id']; // run our query for newsID information $news_comments = selectQuery('*', 'news_comments', 'WHERE news_id='.$urlID.'', 'ORDER BY comment_date', 'DESC', '10'); // requires 6 params // check query for results if(!$news_comments) { // loop error session and initiate var foreach($_SESSION['errors'] as $error=>$err) { print htmlentities($err) . 'for News Comments, be the first to leave a comment!'; } } else { print '<div id="wrap">'; print "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"3\">"; for($i=0; $i<count($news_comments); $i++) { print ' <tr> <td width="30%"><strong>'.$news_comments[$i]['comment_by'].'</strong></td> <td width="70%">'.$news_comments[$i]['comment_date'].'</td> </tr> <tr> <td></td> <td>'.$news_comments[$i]['comment'].'</td> </tr> '; } print '</table></div>'; } }// End function Any help is greatly appreciated.

    Read the article

  • Fun programming languages

    - by Jason Baker
    What are some fun programming languages to learn and work with? I'm asking this for absolutely no practical purpose other than just to learn something new. So, what are some fun languages? I already know Python and C# so those don't count (although Python would probably be the first language I'd recommend). I've spent some time with Ruby, but I don't really see anything that's a whole lot different from Python. (and no, I'm not going to learn Intercal or Brainf*ck before you mention it)

    Read the article

  • Unit Testing Model Classes that inherits from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • Constructor Overloading

    - by Mark Baker
    Normally when I want to create a class constructor that accepts different types of parameters, I'll use a kludgy overloading principle of not defining any args in the constructor definition: e.g. for an ECEF coordinate class constructor, I want it to accept either $x, $y and $z arguments, or to accept a single array argument containg x, y and z values, or to accept a single LatLong object I'd create a constructor looking something like: function __construct() { // Identify if any arguments have been passed to the constructor if (func_num_args() > 0) { $args = func_get_args(); // Identify the overload constructor required, based on the datatype of the first argument $argType = gettype($args[0]); switch($argType) { case 'array' : // Array of Cartesian co-ordinate values $overloadConstructor = 'setCoordinatesFromArray'; break; case 'object' : // A LatLong object that needs converting to Cartesian co-ordinate values $overloadConstructor = 'setCoordinatesFromLatLong'; break; default : // Individual Cartesian co-ordinate values $overloadConstructor = 'setCoordinatesFromXYZ'; break; } // Call the appropriate overload constructor call_user_func_array(array($this,$overloadConstructor),$args); } } // function __construct() I'm looking at an alternative: to provide a straight constructor with $x, $y and $z as defined arguments, and to provide static methods of createECEFfromArray() and createECEFfromLatLong() that handle all the necessary extraction of x, y and z; then create a new ECEF object using the standard constructor, and return that Which option is cleaner from an OO purists perspective?

    Read the article

  • linq delegate function checking from objects

    - by Philip
    I am trying to find the list of objects which can be replaced. Class Letter{ int ID; string Name; string AdvCode; int isDeleted; } Class Replacers{ int ID; string MainAdvCode; string ReplacesAdvCode; } example data: Replacers 0 455 400 1 955 400 2 955 455 such that if a Letter has and Advcode of 455 and another has a code of 400 the 400 gets marked for deletion. And then if another Letter has a 955 then the 455 gets marked for deletion and the 400 (which is already marked) is marked for deletion. The problem is with my current code the 400 and 455 is marking itself for deletion?!?!? Public class Main{ List<Letter> Letters; List<Replacers> replaces; //select the ones to replace the replacements aka the little guys //check if the replacements replacer exists if yes mark deleted var filterMethodReplacements = new Func<Letter, bool>(IsAdvInReplacements);//Working var filterMethodReplacers = new Func<Letter, bool>(IsAdvInReplacers);//NOT WORKING???? var resReplacements=letters.Where(filterMethodReplacements);//working foreach (Letter letter in resReplacements) { //select the Replacers aka the ones that contain the little guys var resReplacers = letters.Where(filterMethodReplacers); if (resReplacers != null) letter.isDeleted = 1; } } } private bool IsAdvInReplacements(Letter letter) { return (from a in Replacables where a.ReplaceAdvCode == letter.AdvCode select a).Any(); } private bool IsAdvInReplacers(Letter letter) { //?????????????????????????????? return (from a in Replacables where a.MainAdvCode == letter.AdvCode select a).Any(); } }

    Read the article

  • Program crashes when item selected from listView

    - by philip
    The application just crash every time I try to click from the list. ListMovingNames.java public class ListMovingNames extends Activity { ListView MoveList; SQLHandler SQLHandlerview; Cursor cursor; Button addMove; EditText etAddMove; TextView temp; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.selectorcreatemove); addMove = (Button) findViewById(R.id.bAddMove); etAddMove = (EditText) findViewById(R.id.etMoveName); temp = (TextView) findViewById(R.id.tvTemp); MoveList = (ListView) findViewById(R.id.lvMoveItems); SQLHandlerview = new SQLHandler(this); SQLHandlerview = new SQLHandler(ListMovingNames.this); SQLHandlerview.open(); cursor = SQLHandlerview.getMove(); startManagingCursor(cursor); String[] from = new String[]{SQLHandler.KEY_MOVENAME}; int[] to = new int[]{R.id.text}; SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this, R.layout.row, cursor, from, to); MoveList.setAdapter(cursorAdapter); SQLHandlerview.close(); addMove.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub try { String ssmoveName = etAddMove.getText().toString(); SQLHandler entry = new SQLHandler(ListMovingNames.this); entry.open(); entry.createMove(ssmoveName); entry.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); MoveList.setOnItemClickListener(new OnItemClickListener() { @SuppressLint("ShowToast") public void onItemClick(AdapterView<?> arg0, View view, int position, long id) { // TODO Auto-generated method stub // String moveset = cursor.getString(position); // temp.setText(moveset); Toast.makeText(ListMovingNames.this, position, Toast.LENGTH_SHORT); } }); } } and here's my database handler. But I'm sure that there's nothing wrong with it, its probably the cursor adapter. SQLHandler.java public class SQLHandler { public static final String KEY_ROOMMOVEHOLDER = "roommoveholder"; public static final String KEY_ROOM = "room"; public static final String KEY_ITEMMOVEHOLDER = "itemmoveholder"; public static final String KEY_ITEMNAME = "itemname"; public static final String KEY_ITEMVALUE = "itemvalue"; public static final String KEY_ROOMHOLDER = "roomholder"; public static final String KEY_MOVENAME = "movename"; public static final String KEY_ID1 = "_id"; public static final String KEY_ID2 = "_id"; public static final String KEY_ID3 = "_id"; public static final String KEY_ID4 = "_id"; public static final String KEY_MOVEDATE = "movedate"; private static final String DATABASE_NAME = "mymovingfriend"; private static final int DATABASE_VERSION = 1; public static final String KEY_SORTANDPURGE = "sortandpurge"; public static final String KEY_RESEARCH = "research"; public static final String KEY_CREATEMOVINGBINDER = "createmovingbinder"; public static final String KEY_ORDERSUPPLIES = "ordersupplies"; public static final String KEY_USEITORLOSEIT = "useitorloseit"; public static final String KEY_TAKEMEASUREMENTS = "takemeasurements"; public static final String KEY_CHOOSEMOVER = "choosemover"; public static final String KEY_BEGINPACKING = "beginpacking"; public static final String KEY_LABEL = "label"; public static final String KEY_SEPARATEVALUES = "separatevalues"; public static final String KEY_DOACHANGEOFADDRESS = "doachangeofaddress"; public static final String KEY_NOTIFYIMPORTANTPARTIES = "notifyimportantparties"; private static final String DATABASE_TABLE1 = "movingname"; private static final String DATABASE_TABLE2 = "movingrooms"; private static final String DATABASE_TABLE3 = "movingitems"; private static final String DATABASE_TABLE4 = "todolist"; public static final String CREATE_TABLE_1 = "CREATE TABLE " + DATABASE_TABLE1 + " (" + KEY_ID1 + " INTEGER PRIMARY KEY AUTOINCREMENT," + KEY_MOVEDATE + " TEXT NOT NULL, " + KEY_MOVENAME + " TEXT NOT NULL);"; public static final String CREATE_TABLE_2 = "CREATE TABLE " + DATABASE_TABLE2 + " (" + KEY_ID2 + " INTEGER PRIMARY KEY AUTOINCREMENT," + KEY_ROOMMOVEHOLDER + " TEXT NOT NULL, " + KEY_ROOM + " TEXT NOT NULL);"; public static final String CREATE_TABLE_3 = "CREATE TABLE " + DATABASE_TABLE3 + " (" + KEY_ID3 + " INTEGER PRIMARY KEY AUTOINCREMENT," + KEY_ITEMNAME + " TEXT NOT NULL, " + KEY_ITEMVALUE + " TEXT NOT NULL, " + KEY_ROOMHOLDER + " TEXT NOT NULL, " + KEY_ITEMMOVEHOLDER + " TEXT NOT NULL);"; public static final String CREATE_TABLE_4 = "CREATE TABLE " + DATABASE_TABLE4 + " (" + KEY_ID4 + " INTEGER PRIMARY KEY AUTOINCREMENT," + KEY_SORTANDPURGE + " TEXT NOT NULL, " + KEY_RESEARCH + " INTEGER NOT NULL, " + KEY_CREATEMOVINGBINDER + " TEXT NOT NULL, " + KEY_ORDERSUPPLIES + " TEXT NOT NULL, " + KEY_USEITORLOSEIT + " TEXT NOT NULL, " + KEY_TAKEMEASUREMENTS + " TEXT NOT NULL, " + KEY_CHOOSEMOVER + " TEXT NOT NULL, " + KEY_BEGINPACKING + " TEXT NOT NULL, " + KEY_LABEL + " TEXT NOT NULL, " + KEY_SEPARATEVALUES + " TEXT NOT NULL, " + KEY_DOACHANGEOFADDRESS + " TEXT NOT NULL, " + KEY_NOTIFYIMPORTANTPARTIES + " TEXT NOT NULL);"; private DbHelper ourHelper; private final Context ourContext; private SQLiteDatabase ourDatabase; private static class DbHelper extends SQLiteOpenHelper{ public DbHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); // TODO Auto-generated constructor stub } @Override public void onCreate(SQLiteDatabase db) { // TODO Auto-generated method stub db.execSQL(CREATE_TABLE_1); db.execSQL(CREATE_TABLE_2); db.execSQL(CREATE_TABLE_3); db.execSQL(CREATE_TABLE_4); } @Override public void onUpgrade(SQLiteDatabase db, int oldversion, int newversion) { // TODO Auto-generated method stub db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE1); db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE2); db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE3); db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE4); onCreate(db); } } public SQLHandler(Context c){ ourContext = c; } public SQLHandler open() throws SQLException{ ourHelper = new DbHelper(ourContext); ourDatabase = ourHelper.getWritableDatabase(); return this; } public void close(){ ourHelper.close(); } public long createMove(String smovename){ ContentValues cv = new ContentValues(); cv.put(KEY_MOVENAME, smovename); cv.put(KEY_MOVEDATE, "Not yet set"); return ourDatabase.insert(DATABASE_TABLE1, null, cv); } public long addRooms(String sroommoveholder, String sroom){ ContentValues cv = new ContentValues(); cv.put(KEY_ROOMMOVEHOLDER, sroommoveholder); cv.put(KEY_ROOM, sroom); return ourDatabase.insert(DATABASE_TABLE2, null, cv); } public long addItems(String sitemmoveholder, String sroomholder, String sitemname, String sitemvalue){ ContentValues cv = new ContentValues(); cv.put(KEY_ITEMMOVEHOLDER, sitemmoveholder); cv.put(KEY_ROOMHOLDER, sroomholder); cv.put(KEY_ITEMNAME, sitemname); cv.put(KEY_ITEMVALUE, sitemvalue); return ourDatabase.insert(DATABASE_TABLE3, null, cv); } public long todoList(String todoitem){ ContentValues cv = new ContentValues(); cv.put(todoitem, "Done"); return ourDatabase.insert(DATABASE_TABLE4, null, cv); } public Cursor getMove(){ String[] columns = new String[]{KEY_ID1, KEY_MOVENAME}; Cursor cursor = ourDatabase.query(DATABASE_TABLE1, columns, null, null, null, null, null); return cursor; } } can anyone point out what I'm doing wrong? here's the log 09-19 03:22:36.596: E/AndroidRuntime(679): FATAL EXCEPTION: main 09-19 03:22:36.596: E/AndroidRuntime(679): android.content.res.Resources$NotFoundException: String resource ID #0x0 09-19 03:22:36.596: E/AndroidRuntime(679): at android.content.res.Resources.getText(Resources.java:201) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.widget.Toast.makeText(Toast.java:258) 09-19 03:22:36.596: E/AndroidRuntime(679): at standard.internet.marketing.mymovingfriend.ListMovingNames$2.onItemClick(ListMovingNames.java:78) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.widget.AdapterView.performItemClick(AdapterView.java:284) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.widget.ListView.performItemClick(ListView.java:3382) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.os.Handler.handleCallback(Handler.java:587) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.os.Handler.dispatchMessage(Handler.java:92) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.os.Looper.loop(Looper.java:123) 09-19 03:22:36.596: E/AndroidRuntime(679): at android.app.ActivityThread.main(ActivityThread.java:4627) 09-19 03:22:36.596: E/AndroidRuntime(679): at java.lang.reflect.Method.invokeNative(Native Method) 09-19 03:22:36.596: E/AndroidRuntime(679): at java.lang.reflect.Method.invoke(Method.java:521) 09-19 03:22:36.596: E/AndroidRuntime(679): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 09-19 03:22:36.596: E/AndroidRuntime(679): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 09-19 03:22:36.596: E/AndroidRuntime(679): at dalvik.system.NativeStart.main(Native Method)

    Read the article

  • wordpress php > div issue

    - by Philip Bateman
    Thanks in advance for you help Ive been doing this as a lovejob for friends and now im getting quotes of several hundred dollars for minor homepage variation and I'm not sure if its valid. I'm not a programmer myself, just trying hard :) Via the CafePress press75 theme, I'm trying to go from 1 / 2 / 3 column home layout, to 1-2 merged and 3, push the 2nd column data to the right and have the 1st column span as a 16:9 gallery (nextgengallery plugin installed). Is this really a complex thing from a coding perspective? The current guy talking to me is saying its going to cost $700 or 800 AUD to alter, which is rough when the template cost $85.. From this http://shocolate.com.au.previewdns.com/wp-content/uploads/2010/05/shocolatecurrent.jpg to this 'url+Shocolatelooklikethis.jpg' I was able to get the sidebar removed by taking out ‘‘ near the bottom of home.css.. Just can’t get the middle data to flow over it? This would be ideal as a result, as the system puts the latest selected blog post on the homepage, so if we can get rid of the sidebar div and have the text appear where it was, that would be ideal. Removing the sidebar from the bottom of home.php and setting the thumbnail width to say 450 gives me the result im after EXCEPT the text doesn’t fill where the sidebar is, it wraps underneath. Reference 'shocolate.com.au.previewdns.com' for current site Thank you!!! Phil (Melbourne)

    Read the article

  • Objective C for Windows

    - by Luther Baker
    What would be the best way to write Objective-C on the Windows platform? Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio? Along those lines - are there any suggestions as to how to link in and use the Windows SDK for something like this. Its a different beast but I know I can write assembly and link in the Windows DLLs giving me accessibility to those calls but I don't know how to do this without googling and getting piecemeal directions. Is anyone aware of a good online or book resource to do or explain these kinds of things?

    Read the article

  • Python 2.7.3 memory error

    - by Tom Baker
    I have a specific case with python code. Every time I run the code, the RAM memory is increasing until it reaches 1.8 gb and crashes. import itertools import csv import pokersleuth cards = ['2s', '3s', '4s', '5s', '6s', '7s', '8s', '9s', 'Ts', 'Js', 'Qs', 'Ks', 'As', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', 'Th', 'Jh', 'Qh', 'Kh', 'Ah', '2c', '3c', '4c', '5c', '6c', '7c', '8c', '9c', 'Tc', 'Jc', 'Qc', 'Kc', 'Ac', '2d', '3d', '4d', '5d', '6d', '7d', '8d', '9d', 'Td', 'Jd', 'Qd', 'Kd', 'Ad'] flop = itertools.combinations(cards,3) a1 = 'Ks' ; a2 = 'Qs' b1 = 'Jc' ; b2 = 'Jd' cards1 = a1+a2 cards2 = b1+b2 number = 0 n=0 m=0 for row1 in flop: if (row1[0] <> a1 and row1[0] <>a2 and row1[0] <>b1 and row1[0] <>b2) and (row1[1] <> a1 and row1[1] <>a2 and row1[1] <>b1 and row1[1] <>b2) and (row1[2] <> a1 and row1[2] <> a2 and row1[2] <> b1 and row1[2] <> b2): for row2 in cards: if (row2 <> a1 and row2 <> a2 and row2 <> b1 and row2 <> b2 and row2 <> row1[0] and row2 <> row1[1] and row2 <> row1[2]): s = pokersleuth.compute_equity(row1[0]+row1[1]+row1[2]+row2, (cards1, cards2)) if s[0]>=0.5: number +=1 del s[:] del s[:] print number/45.0 number = 0 n+=1

    Read the article

  • How do I write a scheme macro that defines a variable and also gets the name of that variable as a s

    - by Jason Baker
    This is mostly a follow-up to this question. I decided to just keep YAGNI in mind and created a global variable (libpython). I set it to #f initially, then set! it when init is called. I added a function that should handle checking if that value has been initialized: (define (get-cpyfunc name type) (lambda args (if libpython (apply (get-ffi-obj name libpython type) args) (error "Call init before using any Python C functions")))) So now here's what I want to do. I want to define a macro that will take the following: (define-cpyfunc Py_Initialize (_fun -> _void)) And convert it into this: (define Py_Initialize (get-cpyfunc "Py_Initialize" (_fun -> _void))) I've been reading through the macro documentation to try figuring this out, but I can't seem to figure out a way to make it work. Can anyone help me with this (or at least give me a general idea of what the macro would look like)? Or is there a way to do this without macros?

    Read the article

  • What programming languages are good for statistics?

    - by Jason Baker
    I'm doing a bit more statistical analysis on some things lately, and I'm curious if there are any programming languages that are particularly good for this purpose. I know about R, but I'd kind of prefer something a bit more general-purpose (or is R pretty general-purpose?). What suggestions do you guys have? Are there any languages out there whose syntax/semantics are particularly oriented towards this? Or are there any languages that have exceptionally good libraries?

    Read the article

  • Is there any way to use GUIDs in django?

    - by Jason Baker
    I have a couple of tables that are joined by GUIDs in SQL Server. Now, I've found a few custom fields to add support for GUIDs in django, but I tend to shy away from using code in blog posts if at all possible. I'm not going to do anything with the GUID other than join on it and maybe assign a GUID on new entries (although this is optional). Is there any way to allow this using django's built-in types? Like can I use some kind of char field or binary field and "trick" django into joining using it? If it's any help, I'm using django-pyodbc.

    Read the article

  • Big-O for Eight Year Olds?

    - by Jason Baker
    I'm asking more about what this means to my code. I understand the concepts mathematically, I just have a hard time wrapping my head around what they mean conceptually. For example, if one were to perform an O(1) operation on a data structure, I understand that the amount of operations it has to perform won't grow because there are more items. And an O(n) operation would mean that you would perform a set of operations on each element. Could somebody fill in the blanks here? Like what exactly would an O(n^2) operation do? And what the heck does it mean if an operation is O(n log(n))? And does somebody have to smoke crack to write an O(x!)?

    Read the article

  • Password hashing in Django

    - by Philip Mais
    I'm trying to integrate vBulliten and Django's user databases. I know vB uses a md5 algorithm to hash it's passwords, with a salt. I have the salt data and the password for each vB user, and would like to know how to import those accounts onto Django. I've tried the obvious, changing the Django user's password to; md5$vb's_salt$vb's_password This just throws back Django's log-in form, with a message saying "username and password does not match" Any ideas?

    Read the article

  • Java: Copying an exe-file and launching afterwards fails

    - by Philip
    Hi, I want to copy an existing .exe-file from one directory to another and launch it afterwards with Java. Like this: FileIO.copy( new File( sourceFile ), new File( targetFile ) ); System.out.println( "Existing: " + new File( targetFile ).exists() ); System.out.println( "Launching " + targetFile ); String cmd[] = { targetFile }; Process p = Runtime.getRuntime().exec( cmd ); p.waitFor(); System.out.println( "Result: " + p.exitValue() ); The output is like this: Existing: true Launching C:\test\Launcher.new.exe Result: 2 So Java says that the file is valid and existing, but Windows just can't launch the process because it thinks the file is not there. The pathes are absolute and with backslashes. I also have all permissions on the files so I'm allowed to execute them. The Launcher.new.exe is generated by Launch4j, so it's more or less standalone. At least it doesn't depend on DLLs in the same folder. But strange: It works when I copy and launch the notepad.exe. One more strange thing: If I don't copy the file by Java but by hand, the launching also fails with the same error. OS is Vista with SP1. Any clue?

    Read the article

  • How do I list all the files for a commit in git

    - by Philip Fourie
    I need to write a script that retrieves all files that were committed for a given SHA1. I have difficulty getting a nice formatted list of all files that were part of the commit. I have tried: git show a303aa90779efdd2f6b9d90693e2cbbbe4613c1d Although listing the files it also includes additional diff information that I don't need. I am hoping there is a simple git command that will provide such a list without me having to parse it from the above command.

    Read the article

  • What is Restful Routing?

    - by John Baker
    I have been searching pretty hard for info out on the net to explain exactly what Restful routing is but I haven't had any success. There are a lot of resources but not a who lot make sense to me. I'm familiar with Ruby On Rails's routing system and well as how Code Igniter and PhpCake route things but is there more to it than having a centralized location where you give out routes based on a directory structure? Like this: controller/action/id/ Admin/editUser/22 I'd appreciate any help with this, it's had me baffled for months. I just thought of putting it on SO. Thanks

    Read the article

  • What's the most scalable way to handle somewhat large file uploads in a Python webapp?

    - by Jason Baker
    We have a web application that takes file uploads for some parts. The file uploads aren't terribly big (mostly word documents and such), but they're much larger than your typical web request and they tend to tie up our threaded servers (zope 2 servers running behind an Apache proxy). I'm mostly in the brainstorming phase right now and trying to figure out a general technique to use. Some ideas I have are: Using a python asynchronous server like tornado or diesel or gunicorn. Writing something in twisted to handle it. Just using nginx to handle the actual file uploads. It's surprisingly difficult to find information on which approach I should be taking. I'm sure there are plenty of details that would be needed to make an actual decision, but I'm more worried about figuring out how to make this decision than anything else. Can anyone give me some advice about how to proceed with this?

    Read the article

  • Detect if PCRE was built without the --enable-unicode-properties or --enable-utf8 configuration switches

    - by Mark Baker
    I've a PHP library that uses a number of regular expressions featuring the \P expressions for multibyte strings, e.g. ((((?:\P{M}\p{M}*)+?)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d+) While this works on most builds, I've had a few reports of the regexp returning an error. Depending on Operating platform, the error messages from PCRE are: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset n or Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset n I know that I can probably test a regexp at the beginning of my code that uses \P, and trap for a returned error, then use that response to set a compatibility flag and provide a degraded (non UTF-8) regexp without the \P within the main body of my code based on that compatibility flag; but I was wondering if there was any simpler way to identify whether PCRE had been built without the --enable-unicode-properties or --enable-utf8 configuration switches. PHP provides access to PCRE_VERSION constant, but that won't help identify whether \P support is enabled or not.

    Read the article

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