Daily Archives

Articles indexed Thursday December 23 2010

Page 11/28 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Two foreach loops, ideea for my code please

    - by webmasters
    Please give me an ideea for my code, its a simple links script. TY I need two foreach loops, one which loops my sites and one which loops my anchors. So i'll have <li>link to site1 and anchor to site1</li> <li>link to site2 and anchor to site2</li> <li>link to site3 and anchor to site3</li> $currentsite = ''.bloginfo('wpurl').''; $mysites = array('http://site1.com', 'http://site2.com', 'http://site3.com'); $myanchors = array('anchor1','anchor2','anchor3'); foreach($mysites as $mysite) ****** i need a foreach loop for the anchors array ******* { if ( $mysite !== $currentsite ){echo '<li><a href="'.$mysite.'" title="'.$myanchor.'">'.$myanchor.'</a></li>';} }

    Read the article

  • How does "Open With" some app in iPhone work?

    - by nybon
    As far as I know, from iOS SDK 3.2, file type handling is added and an iOS application can associate itself with some file type so that other applications can open this kind of file with the application. Because of the sandbox mechanism in iOS, I wonder when a file in appA is opened with appB, which registered itself with this kind of file, what will happen? Is this file copied to appB and both appA and appB keep a copy of this file? If the answer is yes, is it possible to make appB open the file under appA's document folder? I cannot find any Apple documentation on this. For example, appA stores a Keynote document in it, if I open this Keynote document with the Keynote app, is it possible to let Keynote app to edit this document in place so that after editing, appA can see the updated document? Any help is appreciated.

    Read the article

  • GUI Agent accepts statuses from Daemon and shows it using progress indicator

    - by Pavel
    Hi to all! My application is a GUI agent, which communicate with daemon through the unix domain socket, wrapped in CFSocket.... So there are main loop and added CFRunLoop source. Daemon sends statuses and agent shows it with a progress indicator. When there are any data on socket, callback function begin to work and at this time I have to immediately show the new window with progress indicator and increase counter. //this function initiate the runloop for listening socket - (int) AcceptDaemonConnection:(ConnectionRef)conn { int err = 0; conn->fSockCF = CFSocketCreateWithNative(NULL, (CFSocketNativeHandle) conn->fSockFD, kCFSocketAcceptCallBack, ConnectionGotData, NULL); if (conn->fSockCF == NULL) err = EINVAL; if (err == 0) { conn->fRunLoopSource = CFSocketCreateRunLoopSource(NULL, conn->fSockCF, 0); if (conn->fRunLoopSource == NULL) err = EINVAL; else CFRunLoopAddSource(CFRunLoopGetCurrent(), conn->fRunLoopSource, kCFRunLoopDefaultMode); CFRelease(conn->fRunLoopSource); } return err; } // callback function void ConnectionGotData(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void * data, void * info) { #pragma unused(s) #pragma unused(address) #pragma unused(info) assert(type == kCFSocketAcceptCallBack); assert( (int *) data != NULL ); assert( (*(int *) data) != -1 ); TStatusUpdate status; int nativeSocket = *(int *) data; status = [agg AcceptPacket:nativeSocket]; // [stWindow InitNewWindow] inside [agg SendUpdateStatus:status.percent]; } AcceptPacket function receives packet from the socket and trying to show new window with progress indicator. Corresponding function is called, but nothing happens... I think, that I have to make work the main application loop with interrupting CFSocket loop... Or send a notification? No idea....

    Read the article

  • javascript toggle?

    - by MagentoM
    I have written this javascript <script type="text/javascript"> function toggle(user_id) { e=document.getElementById('toggleUserinfo_'+user_id); a=document.getElementById('displayUserinfo_'+user_id); if (e.style.display=='block') { e.style.display='none'; a.innerHTML='show'; } else { e.style.display='block'; a.innerHTML='hide'; } } </script> but its working fine on one page not working on other. The same file is used on both, any ideas?

    Read the article

  • How to write gSOAP server using VC++ (VS2008)?

    - by Falcon
    Hi, I have downloaded gSOAP2.8 from sourceforge. I want to use it for writting a gsoap based server. I need to be able to invoke my C++ code from PHP UI. E.g. My php page would show something like: $res = a + b = ? [Submit] When submit button is clicked I want these parameters to be passed to my c++ function lets say compute_sum() ... and this function should be invoked with these parameters, and the results given back to my php page. I want to write this gsoap based c++ server. Can someone please help me with getting started with it? I need to know: 1] What kind of c++ code it should it be? (Windows console app, or a windows service) 2] How do I launch this server? (Would it need to be a webservice, hosted over something like apache?) Please advise and guide. Regards, Falcon

    Read the article

  • IIS 7.5 401 -UnAuthorized Access on a Virtual Directory

    - by Jimmy
    I have setup a website in IIS 7.5 on a Windows 2008 machine. The website is sitting on C:/websites/ Then I added a virtual directory called "/uploads" that points to "d:/websites/uploads". This directory holds all the images/media. When I browse the website in browser, I dont see any images etc. When I browse an image directly I notice that it's throwing a 401 error. 401 - Unauthorized: Access is denied due to invalid credentials. I have searched Google quite a lot and I am pretty sure I am have all the permissions setup correctly. Can anyone tell me what I could be doing wrong here?

    Read the article

  • How can I install mod_dav_svn 1.6 on CentOS 5.4?

    - by Vincenzo
    I'm trying to install mod_dav_svn on CentOS 5.4, and this is what I see: # yum --enablerepo=rpmforge install mod_dav_svn Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirrors.adams.net * base: mirror.sanctuaryhost.com * extras: mirror.sanctuaryhost.com * rpmforge: fr2.rpmfind.net * updates: mirror.steadfast.net Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package mod_dav_svn.x86_64 0:1.4.2-4.el5_3.1 set to be updated --> Processing Dependency: subversion = 1.4.2-4.el5_3.1 for package: mod_dav_svn --> Running transaction check ---> Package subversion.i386 0:1.4.2-4.el5_3.1 set to be updated --> Finished Dependency Resolution [...] Version 1.4.2 is older than my installed Subversion 1.6.9 (I installed it before). How and where can I get mod_dav_svn in version 1.6.9?

    Read the article

  • VMware vSwitches and Dell PowerConnect BPDU guard

    - by dunxd
    I am using two Dell PowerConnect 6248 switches to connect a VMware host vSwitch. A discussion of config of Cisco switches for use with VMware advises to set physical ports connected to vSwitch with bpduguard and portfast. However, Dell switches don't have the bpduguard setting for individual ports. I can switch it off globally for all portfast ports, but I don't think I want to do that. Should I: Disable STP on the vSwitch connected ports? Leave STP on and enable portfast on the ports, and forget about bpduguard? Disable bpduguard on all portfast ports via global config Do something else? See also: VMware vSwitches and spanning tree

    Read the article

  • 3 Headed Display Ubuntu Wallpaper

    - by Kyle Brandt
    I got 3 display working in Linux. I have set it up so I have Xinerama and 3 different X sessions. So my 3 displays are not all the same size, two are 1680x1050 and then the other which is between the two is 2560x1600. So my issue is when I chose span, even if the image is larger than all 3 resolutions combined, the center monitor has bars at the top and the bottom because span scales the image it seems. Is there a way if I bypass the gui to have an image span all three monitors but with no scaling? Urgent! Please help! ;-)

    Read the article

  • How to connect a Win XP PC and Win 7 PC with a Linksys WRT54G Router to a PPPOE connection ?

    - by ChristianM
    I have two PCs and a WRT56G Router. My provider is a PPPOE connection (username and password). I can connect my Windows 7 easily. Even if I choose Auto or PPPOE on the router's configuration. Maybe because this one had the connection in the first place with the username and password set up. But I can't connect the Windows XP PC. Actually it does connect in a way, but it receives and sents just a few packages. I can actually see in My Network Places how many packages does the Gateway make and it's a big difference. And it won't open any page. How should I set up the router so I can give enough bandwith to the Windows XP PC ? I've seen another problem that I forgot to mention. The router can't connect with the pppoe settings. I don't know why, but with Auto DHCP setting and my Windows 7 connected with pppoe settings works. EDIT2: I've installed Win 7 on the other PC so I won't have any problem of compatibility betwen them. But I still can't connect the router with PPPOE settings to the internet. It looks like this: http://img641.imageshack.us/img641/9780/capturefba.png If you need any other screens or info, please tell me.

    Read the article

  • How to stop windows 7 from asking to format a disk?

    - by clinux
    Hey guys, I have this USB flash drive with a Linux partition that I use inside VirtualBox. Each time I insert it into the USB port, windows keeps asking if it should format it. Is there anyway to disable Windows from asking that? Thanks. EDIT: Disabling auto-run has not resolved the problem unfortunately. Windows will still check if the disk contains a partition it knows about, and ask to format if it doesn't know it. Really nice try though, any other ideas?

    Read the article

  • Qu'est-ce qu'une carrière de développeur réussie ? Un bloggeur imagine la carrière catastrophe, un billet qui pousse à réflechir

    Qu'est-ce qu'une carrière de développeur réussie ? Un bloggeur imagine la carrière catastrophe, un billet qui pousse à réflechir Dans les métiers de l'informatique, les développeurs, un peu comme tous les employés, sont de plus en plus amenés à changer régulièrement d'entreprise, à la recherche de meilleures rémunérations, de meilleures conditions de travail ou de nouveaux défis. Durant sa carrière, le développeur risque donc de passer par des postes qu'il pense, avec du recul, n'avoir jamais du accepter. C'est en tout cas ce que relate Scott C. Reynolds, un bloggeur qui se définit lui-même comme "un collectionneur de rêves de carrières brisées".

    Read the article

  • Quel cadeau Hi-Tech ou « Geek » espérez-vous pour Noël ? Et quels produits attendus pour 2011 vous font rêver ?

    Quel cadeau Hi-Tech ou « Geek » allez-vous offrir à Noël ? Et quels produits attendus pour 2011 vous font rêver ? Ecrit en collaboration avec Gordon Fowler Noël. J-1. Les parents retardataires se pressent dans les magasins. Les enfants ont des sourires jusqu'aux oreilles. Et les commerçants travaillent d'arrache-pied pour assurer leur chiffre d'affaires annuels. Noël, la fête des petits. Mais aussi la fête des grands. Surtout pour les « Geeks », toujours prêts à s'émerveiller pour les objets insolites, les nouveautés de tout poil et la technologie. Un iPad sous le sapin, un NAS, un T-Shirt Wifi, le CD des meilleures musiqu...

    Read the article

  • Emploi : Bilan mitigé pour l'année 2010 pour les postes IT

    Emploi : Bilan de l'année 2010 pour les postes IT, que prévoir en 2011 ? L'année 2010 touche à sa fin, aussi, avant l'avènement de l'année suivante, il est bon de faire un bilan des rebondissements qui ont animé la rubrique emploi de Developpez.com ces douze derniers mois. Premier constat : c'était mieux qu'en 2009, année catastrophique en raison des répercussions de la crise économique. Cette année, le marché s'est réveillé. Certes, la reprise est modeste, mais elle est là, et ça se voit. Le nombre d'embauches a augmenté par rapport à l'année précédente. Les recrutements ont connu une belle croissance : la note trimestrielle de conjoncture du marché de l'emploi des cadres diffusée fin octobre 2010 par...

    Read the article

  • Oracle Forms 11g Customer Upgrade Reference

    - by Grant Ronald
    We have just published a reference to an Oracle customer, Callista, talking about their Forms upgrade experiences and future development plans. I'm actually seeing a huge number of Forms customers upgrading to 11g but it can take some time and effort for customers to formally agree to be a reference story, so I'm grateful to Callista for taking the time to become an 11g upgrade reference.  We have a number of other customers who are writing up their upgrade experiences and we hope to have these on OTN in the coming months. You can access this from the Forms home page on OTN.

    Read the article

  • testing if constructor in constructor chain

    - by Delan Azabani
    I'm attempting to implement a GTK+ inspired widget toolkit for the web in JavaScript. One of the constructor chains goes gtk.widget => gtk.container => gtk.bin => gtk.window Every gtk.widget has a showAll method, which, if and only if the widget is a gtk.container or derivative (such as gtk.bin or gtk.window), will recursively show the children of that widget. Obviously, if it isn't a gtk.container or derivative, we shouldn't do anything because the widget in question can't contain anything. For reference, here is my inheritance function; it's probably not the best, but it's a start: function inherit(target, parent) { target.prototype = new parent; target.prototype.constructor = target; } I know that I can check for the direct constructor like this: if (this.constructor === gtk.container) ... However, this only tests for direct construction and not, say, if the object is a gtk.bin or gtk.window. How can I test whether gtk.container is somewhere up in the constructor chain?

    Read the article

  • jQuery UI sortable - sorting images

    - by GSTAR
    I've just implemented the jQuery UI sortable plugin for a set of images. The markup I have is as follows: <ul id="images" class="ui-sortable"> <li id="7884029"><img src="/images/member/4698568/7884029_t.jpg" alt="" /></li> <li id="7379458"><img src="/images/member/4698568/7379458_t.jpg" alt="" /></li> <li id="1704208"><img src="/images/member/4698568/1704208_t.jpg" alt="" /></li> <li id="1750715"><img src="/images/member/4698568/1750715_t.jpg" alt="" /></li> <li id="4364912"><img src="/images/member/4698568/4364912_t.png" alt="" /></li> </ul> <script type="text/javascript"> /*<![CDATA[*/ jQuery(function($) { jQuery('#images').sortable({'delay':'100'}); }); /*]]>*/ </script> The LI id is the 'name' column in the DB table - I prefer not to display the ID column. Now my question is how do I capture the sorting? I understand this would be an AJAX request but I have no idea how to do it. I have set up a sort_order column in my DB table and I am using PHP as my scripting language. I could do with a code example. EDIT: Ideally I prefer if the sort order is applied upon moving an item, i.e. I do not want to enclose it all in a form.

    Read the article

  • Should I be building GUI applications on Windows using Perl & Tk?

    - by CheeseConQueso
    I have a bunch of related Perl scripts that I would like to put together in one convenient place. So I was thinking of building a GUI and incorporating the scripts. I'm using Strawberry Perl on Windows XP and have just installed Tk from cpan about fifteen minutes ago. Before I go for it, I want some sound advice either for or against it. My other option is to translate the Perl scripts into VB and use Visual Studio 2008, but that might be too much hassle for an outcome that might end up all the same had I just stuck with Perl & Tk. I haven't looked yet, but maybe there is a module for Visual Studio that would allow me to invoke Perl scripts? The main requirements are: It must be able to communicate with MySQL It must be able to fetch & parse XML files from the internet It must be transportable, scalable, and sustainable What direction would you take?

    Read the article

  • Projecting a targetting ring using direct3d

    - by JohnB
    I'm trying to draw a "targetting ring" on the ground below a "unit" in a hobby 3d game I'm working on. Basically I want to project a bright red patterned ring onto the ground terrain below the unit. The only approach I can think of is this - Draw the world once as normal Draw the world a second time but in my vertex shader I have the world x,y,z coordinates of the vertex and I can pass in the coordinates of the highlighted unit - so I can calculate what the u,v coordinates in my project texture should be at that point in the world for that vertex. I'd then use the pixel shader to pick pixels from the target ring texture and blend them into the previously drawn world. I believe that should be easy, and should work but it involves me drawing the whole visible world twice as it's hard to determine exactly which polygons the targetting ring might fall onto. It seems a big overhead to draw the whole world twice, once for the normal lit textured ground, and then again just to draw the targetting ring. Is there a better approach that I'm missing?

    Read the article

  • Unassigned value error asp.net C#

    - by slash shogdhe
    if variable is not assigned,then it takes the default value at run time. for example int A1; if i will check the value of A1 at runtime it will be 0; then why at compile time it throws a error of unassigned value; why clr dont use to alot the default value at runtime; int A1; int B1 = A1+10; it shud be 11 as the default value of A1 is 0; there project property where i can check for "assignn defalut values for unassigned variable"; can any one tell me where i can find it;

    Read the article

  • Best way to fetch data from a single database table with multiple threads?

    - by Ravi Bhatt
    Hi, we have a system where we collect data every second on user activity on multiple web sites. we dump that data into a database X (say MS SQL Server). we now need to fetch data from this single table from daatbase X and insert into database Y (say mySql). we want to fetch time based data from database X through multiple threads so that we fetch as fast as we can. Once fetched and stored in database Y, we will delete data from database X. Are there any best practices on this sort of design? any specific things to take care on table design like sharing or something? Are there any other things that we need to take care to make sure we fetch it as fast as we can from threads running on multiple machines? Thanks in advance! Ravi

    Read the article

  • PHP MySQL Zend-ACL - Find all inherited items (Children / Parents)

    - by Scoobler
    I have one MySQL DB table like the following, the resources table: id | name | type 1 | guest | user 2 | member | user 3 | moderator | user 4 | owner | user 5 | admin | user 6 | index | controller Onto the next table, the rules table: id | user_id | rule | resource_id | extras 1 | 2 | 3 | 1 | null 2 | 3 | 3 | 2 | null 3 | 4 | 3 | 3 | null 4 | 5 | 3 | 4 | null 5 | 6 | 1 | 1 | index,login,register 6 | 6 | 2 | 2 | login,register 7 | 6 | 1 | 2 | logout OK, sorry for the length, but I am trying to give a full picture of what I am trying to do. So the way it works, a role (aka user) can be granted (rule: 1) access to a controller, a role can inherit (rule: 3) access from another role or a role and be denied (rule: 2) access to a controller. (A user is a resource and a controller is a resource) Access to actions are granted / denied using the extras column. This all works, its not a problem with setting up the ACL within zend. What I am now trying to do is show the relationships; to do that I need to find the lowest level a role is granted access to a controller stopping if it has explicitly been removed. I plan on listing the roles. When I click a role, I want it to show all the controllers that role has access to. Then clicking on a controller shows the actions the role is allowed to do. So in the example above, a guest is allowed to view the index action of the index controller along with the login action. A member inherits the same access, but is then denied access to the login action and register action. A moderator inherits the rules of a member. So if I were to select the role moderator. I want to see the controller index listed. If I click on the controller, it should show the allowed actions as being action: index. (which was originally granted to the guest, but hasn't since been dissallowed) Is there any examples to doing this. I am obviously working with the Zend MVC (PHP) and MySQL. Even just a persudo code example would be a helpful starting point - this is one of the last parts of the jigsaw I am putting together. P.S. Obviously I have the ACL object - is it going to be easier to interigate that or is it better to do it my self via PHP/MySQL? The aim will be, show what a role can access which will then allow me to add or edit a role, controller and action in a GUI style (that is somewhat the easy bit) - currently I am updating the DB manually as I have been building the site.

    Read the article

  • odd nullreference error at foreach when rendering view

    - by giddy
    This error is so weird I Just can't really figure out what is really wrong! In UserController I have public virtual ActionResult Index() { var usersmdl = from u in RepositoryFactory.GetUserRepo().GetAll() select new UserViewModel { ID = u.ID, UserName = u.Username, UserGroupName = u.UserGroupMain.GroupName, BranchName = u.Branch.BranchName, Password = u.Password, Ace = u.ACE, CIF = u.CIF, PF = u.PF }; if (usersmdl != null) { return View(usersmdl.AsEnumerable()); } return View(); } My view is of type @model IEnumerable<UserViewModel> on the top. This is what happens: Where and what exactly IS null!? I create the users from a fake repository with moq. I also wrote unit tests, which pass, to ensure the right amount of mocked users are returned. Maybe someone can point me in the right direction here? Top of the stack trace is : at lambda_method(Closure , User ) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at ASP.Index_cshtml.Execute() Is it something to do with linq here? Tell me If I should include the full stack trace.

    Read the article

  • How to check if EditText has a value in Android / Java

    - by Allen Gingrich
    This should be simple, but I have tried if statements checking for null values and also ones checking the .length of it: EditText marketValLow = (EditText) findViewById(R.id.marketValLow); EditText marketValHigh = (EditText) findViewById(R.id.marketValHigh); if (marketValLow.getText().length() != 0 && marketValHigh.getText().length() != 0) { Intent intent = new Intent(); intent.setClass(v.getContext(), CurrentlyOwe.class); startActivity(intent); } else { Toast.makeText(CurrentMarketValue.this, "You need to enter a high AND low.", Toast.LENGTH_SHORT); } But it doesn't detect nothing was entered. Any ideas? Thanks!

    Read the article

  • cx_Oracle makes subprocess give OSError

    - by Shrikant Sharat
    I am trying to use the cx_Oracle module with python 2.6.6 on ubuntu Maverick, with Oracle 11gR2 Enterprise edition. I am able to connect to my oracle db just fine, but once I do that, the subprocess module does not work anymore. Here is an iPython session that reproduces the problem... In [1]: import subprocess as sp, cx_Oracle as dbh In [2]: sp.call(['whoami']) sharat Out[2]: 0 In [3]: con = dbh.connect('system', 'password') In [4]: con.close() In [5]: sp.call(['whomai']) --------------------------------------------------------------------------- OSError Traceback (most recent call last) /home/sharat/desk/calypso-launcher/<ipython console> in <module>() /usr/lib/python2.6/subprocess.pyc in call(*popenargs, **kwargs) 468 retcode = call(["ls", "-l"]) 469 """ --> 470 return Popen(*popenargs, **kwargs).wait() 471 472 /usr/lib/python2.6/subprocess.pyc in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags) 621 p2cread, p2cwrite, 622 c2pread, c2pwrite, --> 623 errread, errwrite) 624 625 if mswindows: /usr/lib/python2.6/subprocess.pyc in _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) 1134 1135 if data != "": -> 1136 _eintr_retry_call(os.waitpid, self.pid, 0) 1137 child_exception = pickle.loads(data) 1138 for fd in (p2cwrite, c2pread, errread): /usr/lib/python2.6/subprocess.pyc in _eintr_retry_call(func, *args) 453 while True: 454 try: --> 455 return func(*args) 456 except OSError, e: 457 if e.errno == errno.EINTR: OSError: [Errno 10] No child processes So, the call to sp.call works fine before connecting to oracle, but breaks after that. Even if I have closed the connection to the database. Looking around, I found http://bugs.python.org/issue1731717 as somewhat related to this issue, but I am not dealing with threads here. I don't know if cx_Oracle is. Moreover, the above issue mentions that adding a time.sleep(1) fixes it, but it didn't help me. Any help appreciated. Thanks.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >