Daily Archives

Articles indexed Wednesday May 12 2010

Page 28/121 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • extract associative array within an array in php

    - by I Like PHP
    i have an array like this Array ( [0] => Array ( [s_id] => 4 [si_id] => sec_1 [d_id] => dep_4 [s_name] => sec1 [s_location] => LA [s_visibility] => yes [s_created_date] => 1273639343 [s_last_updated_date] => 1273639343 [s_created_by] => someone [s_last_updated_by] => everyone ) ) now i want to extract array[0] into an array... means i want this Array ( [s_id] => 4 [si_id] => sec_1 [d_id] => dep_4 [s_name] => sec1 [s_location] => LA [s_visibility] => yes [s_created_date] => 1273639343 [s_last_updated_date] => 1273639343 [s_created_by] => someone [s_last_updated_by] => everyone ) how do i get above results?

    Read the article

  • Opinion of Hosted SVN providers?

    - by JP
    What is your opinion of the various online Hosted SVN providers? How do they all compare? I'm looking for thoughts on Assembla, Unfuddle, BeanStalk, CVSDude, ProjectLocker, and any others that I forgot to mention. Thanks for your insight and input.

    Read the article

  • Redundant code constructs

    - by Diomidis Spinellis
    The most egregiously redundant code construct I often see involves using the code sequence if (condition) return true; else return false; instead of simply writing return (condition); I've seen this beginner error in all sorts of languages: from Pascal and C to PHP and Java. What other such constructs would you flag in a code review?

    Read the article

  • LotusScript - Setting element in for loop

    - by Kris.Mitchell
    I have an array set up Dim managerList(1 To 50, 1 To 100) As String what I am trying to do, is set the first, second, and third elements in the row managerList(index,1) = tempManagerName managerList(index,2) = tempIdeaNumber managerList(index,3) = 1 But get an error when I try to do that saying that the object variable is not set. I maintain index as an integer, and the value corresponds to a single manager, but I can't seem to manually set the third element. The first and second elements set correctly. On the flip side, I have the following code that will allow for the element to be set, For x=1 To 50 If StrConv(tempManagerName,3) = managerList(x,1) Then found = x For y=3 to 100 If managerList(x,y) = "" Then managerList(x,y) = tempIdeaNumber Exit for End If Next Exit For End If Next It spins through the array (laterally) trying to find an empty element. Ideally I would like to set the index of the element the y variable is on into the 3rd element in the row, to keep a count of how many ideas are on the row. What is the best way to keep a count like this? Any idea why I am getting a Object variable not set error when I try to manually set the element?

    Read the article

  • How to read information from .3gp and .mp4 using ffmpeg-php?

    - by Neltharian
    I have a bit of a problem with ffmpeg-php. I'm trying to get some information from video files and it works pretty fine with file formats like .avi, .mpg or .flv but when I try to use .3gp or .mp4 in: $movie = new ffmpeg_movie('path/to/file/test.3gp'); I get error like this : ffmpeg_movie::__construct() []: ISO: File Type Major Brand: 3gp5 or ffmpeg_movie::__construct() []: ISO: File Type Major Brand: mp42 I installed ffmpeg-php on WAMP using instructions found here: http://stackoverflow.com/questions/1172916/how-to-install-ffmpeg-in-wampserver-2-0-windows-xp I need those information to send them to ffmpeg using exec(). Anyone could help me with this?

    Read the article

  • Version control of Mathematica notebooks

    - by Etaoin
    Mathematica notebooks are, of course, plaintext files -- it seems reasonable to expect that they should play nice with a version-control system (git in my case, although I doubt the specific system matters). But the fact is that any .nb file is full of cache information, timestamps, and other assorted metadata. Scads of it. Which means that limited version control is possible -- commits and rollbacks work fine. Merging, though, is a disaster. Mathematica won't open a file with merge markers in it, and a text editor is no way to go through a .nb file. Has anyone had any luck putting a notebook under version control? How?

    Read the article

  • Problem with reading data from plist iphone sdk

    - by neha
    Hi all, I'm creating a myDb.plist file in my resources folder and trying to read it, but it's not getting read. I'm using the following code. NSString* plistPath = [[NSBundle mainBundle] pathForResource:@"myDb" ofType:@"plist"]; contentArray = [NSArray arrayWithContentsOfFile:plistPath]; contentArray is showing null. Can anybody please help me? Thanx in advance.

    Read the article

  • Do I need to rebuild application after adding a new iPhone in ad hoc distribution?

    - by RaYell
    I'm using Ad Hoc distribution to send preview/beta version of my iPhone apps to customers for approval. I'm always sending a zipped application and mobileprovision files. Sometimes however I encountered situation when nothing in the application changed but we needed to add a new device for testing. I've added a device in Provisioning portal and assigned it to a provisioning profile my application uses for ad hoc distribution. I've downloaded new mobileprovision file and imported it to xcode now the question is do I need to rebuild the application to enable the app on a new device or would it be enough to just send old build with updated mobileprovision file?

    Read the article

  • Android local search

    - by Aleksander O
    Hi! I'm trying to implement a local search in my activity. I've added an appropriate intent filter and metadata tag to manifest file but if I click Search button it invokes standard android search box. What's my problem? Manifest file: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nixsolutions.invertigation.android.dataprovider" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> <provider android:name="NoteProvider" android:authorities="com.nixsolutions.investigation.android.NoteProvider"> </provider> <activity android:name="NotesList"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SEARCH" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> </activity> </application> <uses-sdk android:minSdkVersion="7" /> </manifest> searchable.xml: <?xml version="1.0" encoding="utf-8"?> <searchable xmlns:android="http://schemas.android.com/apk/res/android" android:label="Custom search" android:hint="Custom hint" android:searchMode="showSearchLabelAsBadge" />

    Read the article

  • Reporting available RDP sessions

    - by Sergei
    Hi All Default Windows 2003 Server has two RDP sessions available.If all of them are taken by someone else you will only be notified about it after providing your credentials. This seems like a waste of time especially in our environment where we share a lot of development server. Could a message be given as soon as you open the connection window if the connections are taken up? We can use qwinsta based script to check sessions before logon but it's still takes time. Is there a feature to do what I am asking for?

    Read the article

  • BIOS root kit? Or, how do I fresh install a clean BIOS?

    - by Leopold_Bloom
    So I was installing questionable operating system onto my EEE pc and it required me to downgrade the BIOS which I really am not an expert at. I used a patch and it appeared to work. Now, I'm paranoid about the downgrade because, honestly, I have no idea where the code came from or what could be in it. My question, then, is it possible to "start over" completely fresh with my BIOS? As in wipe out the possibly malicious BIOS and go back to the manufacturer-provided one? Has anyone done something similar to this? I just want to install Ubuntu Netbook Remix to the EEE pc 1000 but I want to make sure the BIOS are secure. Any advice would help tremendously, or am I just being uber paranoid? BIOS are definitely not my strength.

    Read the article

  • C++ MTL Library dimension.h bug?

    - by avanwieringen
    I've installed MTL on my Fedora Core 12 x64 system, but when building an application I get the following error: In file included from /usr/local/include/mtl/matrix.h:41, from /usr/local/include/mtl/mtl.h:40, from ltiSystem.hxx:4, from strTools.hxx:4, from ff.cxx:3: /usr/local/include/mtl/envelope2D.h:72: error: declaration of ‘typedef struct mtl::twod_tag mtl::envelope2D<T>::dimension’ /usr/local/include/mtl/dimension.h:19: error: changes meaning of ‘dimension’ from ‘class mtl::dimension<typename mtl::dense1D<T, 0>::size_type, 0, 0>’ make[1]: *** [ff.o] Error 1 Which would imply an error in MTL. I have changed to different MTL versions and the problem persists, but on Google there is no proper answer. I use the g++ compiler. Does anyone have a clye?

    Read the article

  • Java Architecture Decision !!

    - by santiagobasulto
    Hi everybody! I'm developing a medium Java app, and i'm facing a small problem due to my lack of expirience. I've a custom DAO, which gets "Article" objects from the DataBase. I've the Article class, and the DAO has a method called getArticle(int id), this method returns an Article. The Article has a Category object, and i'm using lazy loading. So, when i request for an Article Category (Article a = new Article(); a.getCategory();) the Article class gets the Category from the DAO and then returns it. I'm now thinking to cache it, so when i request multiple times to an Article's category, the database is only queried one time. My question is: where should i put that cache? I can put it on the Article class (in the DTO), or i can put it on the DAO class. What do you say? Thanks!

    Read the article

  • error LNK2019 for ZLib sample compare.

    - by Nano HE
    Hello. I created win32 console application in vs2010 (without select the option of precompiled header). And I inserted the code below. but *.obj link failed. Could you provide me more information about the error. I searched MSDN, but still can't understand it. #include <stdio.h> #include "zlib.h" // Demonstration of zlib utility functions unsigned long file_size(char *filename) { FILE *pFile = fopen(filename, "rb"); fseek (pFile, 0, SEEK_END); unsigned long size = ftell(pFile); fclose (pFile); return size; } int decompress_one_file(char *infilename, char *outfilename) { gzFile infile = gzopen(infilename, "rb"); FILE *outfile = fopen(outfilename, "wb"); if (!infile || !outfile) return -1; char buffer[128]; int num_read = 0; while ((num_read = gzread(infile, buffer, sizeof(buffer))) > 0) { fwrite(buffer, 1, num_read, outfile); } gzclose(infile); fclose(outfile); } int compress_one_file(char *infilename, char *outfilename) { FILE *infile = fopen(infilename, "rb"); gzFile outfile = gzopen(outfilename, "wb"); if (!infile || !outfile) return -1; char inbuffer[128]; int num_read = 0; unsigned long total_read = 0, total_wrote = 0; while ((num_read = fread(inbuffer, 1, sizeof(inbuffer), infile)) > 0) { total_read += num_read; gzwrite(outfile, inbuffer, num_read); } fclose(infile); gzclose(outfile); printf("Read %ld bytes, Wrote %ld bytes, Compression factor %4.2f%%\n", total_read, file_size(outfilename), (1.0-file_size(outfilename)*1.0/total_read)*100.0); } int main(int argc, char **argv) { compress_one_file(argv[1],argv[2]); decompress_one_file(argv[2],argv[3]);} Output: 1>------ Build started: Project: zlibApp, Configuration: Debug Win32 ------ 1> zlibApp.cpp 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(15): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen' 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(25): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen' 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(40): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen' 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(36): warning C4715: 'decompress_one_file' : not all control paths return a value 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(57): warning C4715: 'compress_one_file' : not all control paths return a value 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzclose referenced in function "int __cdecl decompress_one_file(char *,char *)" (?decompress_one_file@@YAHPAD0@Z) 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzread referenced in function "int __cdecl decompress_one_file(char *,char *)" (?decompress_one_file@@YAHPAD0@Z) 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzopen referenced in function "int __cdecl decompress_one_file(char *,char *)" (?decompress_one_file@@YAHPAD0@Z) 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzwrite referenced in function "int __cdecl compress_one_file(char *,char *)" (?compress_one_file@@YAHPAD0@Z) 1>D:\learning\cpp\cppVS2010\zlibApp\Debug\zlibApp.exe : fatal error LNK1120: 4 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Read the article

  • JQTouch Pressure Sensitivity

    - by rson
    I noticed an interesting bug with the JQTouch platform and wanted to know if anyone else has run into it our has a workaround for it. If I have a link with an onclick event and lightly tap the link on the iPhone, the link works, but the click event is not fired. If I tap the same link harder, the event fires. Any thoughts on this?

    Read the article

  • search and display string from group of string php

    - by zahir hussain
    hi i want to know how to search and display string from group of string like google display the word which we search... the following example from google search word is google books result Search and preview millions of books from libraries and publishers worldwide using Google Book Search. Discover a new favorite or unearth an old classic. i would like to do this type of one... thanks and advance

    Read the article

  • Manipulating source packages from Hackage how to easy deploy to several windowsboxes?

    - by Jonke
    Recently when I have found good sources packages for ghc 6.12/6.10 on Hackage I've been forced to do some minor or major changes to the cabal files to make those packages to work under windows. Besides to fork and merge my fixes with github, what seems to be the best way/ good enough practice to take these modified builds to a couple of other windows boxes that only has a basic haskell platform installed? I should prefer if I somehow could work with the cabal-install because that is what one normally use. Should one put the modfied build dirs on a shared/networked dir and mount from the targeted windows box? Say something like this: on machine prepare cabal fetch foo cabal unpack foo cd foo edit .cabal and .hs cabal configure cabal build On machine useanddevelopnormal cd machinepreparemount cd foo cabal install

    Read the article

  • Initializing a array after declaration

    - by robUK
    Hello, gcc 4.4.3 c89 I have the following code as a sample of what I am trying to do. I don't know the actual size of the array, until I enter the function. However, I don't think I can set the array size after I have declared it. I need it global as some other functions will need to access the device names. Many thanks for any suggestions, /* global */ char *devices_names[]; void fill_devices(size_t num_devices) { devices_names[num_devices]; /* start filling */ }

    Read the article

  • What books help one to learn to read code?

    - by Daniel
    Lion's Commentary on Unix Sixth Edition with Source Code is a wonderful book to learn how to read code. Reading code is important -- how does one learn how to write excellent code without having read excellent code? But, sadly, while great writers, of fiction and non-fiction, all spend a great deal of time reading stuff, we, programmers, seem to avoid it like the plague. Worse still, programming books usually go the same way. They might show a pattern or a style, but they often avoid showing good, complex code, and helping one go through it. There are exceptions, of course. I hope. So, with that in mind, what books are to be found which help one learn how to read code?

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >