Daily Archives

Articles indexed Monday April 26 2010

Page 31/110 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Is there any two-panels bookmarks manager for Google Chrome?

    - by L. Shaydariv
    Hi to all. I'm just wondering, is there any two-panels-interface (like Total Commander, File Manager, etc) bookmark manager, extension, etc for Google Chrome? Using of the default bookmark manager is not so suitable because of two reasons: 1) I've gathered a very large collection of bookmarks (please, don't ask why) 2) bookmarks hierarchy tree always expands its branches when the bookmark manager is open (this makes the moving of bookmarks through the bookmark tree much and much harder). I tried to use Link Commander but it's very and very slow. Any suggestions? Thank you for advices.

    Read the article

  • Help needed for SOAPUI

    - by Kangkan
    I am trying to test my webservice using SOAPUI (the free version). For testing concurrency, I wished to fire concurrent threads from SOAPUI onto the service. But with the options, the thred count increases gradually (even in the burst mode). The machine where SOAPUI is installed is a WinXP machine. Can I actually do the concurrency testing? If so how? Please guide me.

    Read the article

  • How to check if a checkbox/ radio button is checked in php

    - by user225269
    I have this html code: <tr> <td><label><input type="text" name="id" class="DEPENDS ON info BEING student" id="example">ID</label></td> </tr> <tr> <td> <label> <input type="checkbox" name="yr" class="DEPENDS ON info BEING student"> Year</label> </td> </tr> But I don't have any idea on how do I check this checkboxes if they are checked using php, and then output the corresponding data based on the values that are checked. Please help, I'm thinking of something like this. But of course it won't work, because I don't know how to equate checkboxes in php if they are checked: <?php $con = mysql_connect("localhost","root","nitoryolai123$%^"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("school", $con); $id = mysql_real_escape_string($_POST['idnum']); if($_POST['id'] == checked & $_POST['yr'] ==checked ){ $result2 = mysql_query("SELECT * FROM student WHERE IDNO='$id'"); echo "<table border='1'> <tr> <th>IDNO</th> <th>YEAR</th> </tr>"; while($row = mysql_fetch_array($result2)) { echo "<tr>"; echo "<td>" . $row['IDNO'] . "</td>"; echo "<td>" . $row['YEAR'] . "</td>"; echo "</tr>"; } echo "</table>"; } mysql_close($con); ?>

    Read the article

  • List of images that wraps

    - by nourdine
    I have a LinearLayout with fixed view. I dynamically inject images in it (ImageViews) but I dunno in advance how many of them will be inserted. I'd like to have a layout where images wrap and go to a new line authomatically when they exceed the available width of the father (LinearLayout) how do you recommend I should move? thanks a lot

    Read the article

  • jQuery change id!

    - by Kyle Sevenoaks
    I am a jQuery noobie, and have been trying to add a script to change the id of a div onClick. Here is a jsfiddle example. $(function accept() { $("div:scrollwrap").attr('scrollwrap','highlight'); });? Thanks :)

    Read the article

  • .NET: How to place my window near the notification area (systray)?

    - by Vilx-
    I'd like to display a little popup window next to the notification area. It's similar to what Outlook/Skype/Live! Messenger/etc does when it displays the notification about a new message. In my case it will have some input controls (textbox, datetimepicker, buttons...) so a simple bubble won't do. The trick is doing this correctly when the user has multiple monitors and/or the taskbar is not located at the bottom of the screen.

    Read the article

  • Rate Limit Calls To Api Using Cache

    - by namtax
    Hi I am using coldfusion to call the last.fm api, using a cfc bundle sourced from here I am concerned about going over the request limit, which is 5 requests per originating IP address per second, averaged over a 5 minute period. The cfc bundle has a central component which calls all the other components, which are split up into sections like "artist", "track" etc...This central component "lastFmApi.cfc." is initiated in my application, and persisted for the lifespan of the application // Application.cfc example <cffunction name="onApplicationStart"> <cfset var apiKey = '[your api key here]' /> <cfset var apiSecret = '[your api secret here]' /> <cfset application.lastFm = CreateObject('component', 'org.FrankFusion.lastFm.lastFmApi').init(apiKey, apiSecret) /> </cffunction> Now if I want to call the api through a handler/controller, for example my artist handler...I can do this <cffunction name="artistPage" cache="5 mins"> <cfset qAlbums = application.lastFm.user.getArtist(url.artistName) /> </cffunction> I am a bit confused towards caching, but am caching each call to the api in this handler for 5 mins, but does this make any difference, because each time someone hits a new artist page wont this still count as a fresh hit against the api? Wondering how best to tackle this Thanks

    Read the article

  • Is it possible to have a local group for an LDAP user

    - by fakedrake
    I have an LDAP server to which i do not have full privileges and an ubuntu system with LDAP authentication to which i am root. Is it possible to add an LDAP user to a local group? (i dont know if i phrase this correctly but all i want is to have a user in LDAP in a group without edititing the actual database)

    Read the article

  • Formatting in a UITextView

    - by richard Stephenson
    hi all , im having problems with formatting for a UITextView. my app pulls in XML, saves some of it to a string , and then displays the text in a UITextView. it understands if you put a return in there, and it starts a new line. but i want to put paragraphs in there, any idea how i can pass that information without doing multiple UITextViews Thanks :)

    Read the article

  • How can I combine result and subquery for IN comparison (mysql)

    - by user325804
    In order for a school project i need to create the following situation within one mysql query. The situation is as such, that a child's tags and a parent's tags need to be combined into one, and compared to a site's tags, depending on a few extra simple equals to lines. For this to happen I only see the option that the result of a subquery is combined with a sub query within that query, as such: SELECT tag.*, (SELECT group_concat(t1.id, ',', (SELECT group_concat(tag.id) FROM adcampaign INNER JOIN adcampaign_tag ON adcampaign.id = adcampaign_tag.adcampaign_id INNER JOIN tag ON adcampaign_tag.tag_id = tag.id WHERE adcampaign.id = 1)) FROM ad, ad_tag, tag AS t1 WHERE ad.id = ad_tag.ad_id AND ad_tag.tag_id = t1.id AND ad.adcampaign_id = 1 AND ad.agecategory_id = 1 AND ad.adsize_id = 1 AND ad.adtype_id = 1) as tags FROM tag WHERE tag.id IN tags But the IN comparison only returns the first result because now the tags aren't a list but a concanated string. Anyone got any suggestion on this? I really need a way to combine it into one array

    Read the article

  • How to use Mysql variables with Hibernate ?

    - by Jerome C.
    Hello, I need to use a native sql query in Hibernate with use of variable. But hibernate throws an error saying: Space is not allowed after parameter prefix So there is a conflict with the := mysql variable assignment and hibernate variable assignment. Here is my sql query: SET @rank:=0; UPDATE Rank SET rank_Level=@rank:=@rank+1 ORDER BY Level; I can't use a stored procedure because my sql query is dynamically generated ('Level' can be 'int' or 'force'...) How can I do this ? thanks

    Read the article

  • PHP - displaying 1 random record for each week

    - by mike
    I want to display 1 random record from a database based on the week. I need to determine if it's a new, and if it is a new week, then select the record and display the new record. I'm thinking I can just use a single day of the week to generate the new record, either way will work. I'm really having a hard time conceptualizing how I'll store the record id and not select a new one when someone visits again the same day or refreshes the page. Any ideas? Let me know if I wasn't clear enough.

    Read the article

  • Use MTOM/streaming from C# calling a webservice in java exposed via jaxws

    - by raticulin
    We have this webservice created with jax-ws @WebService(name = "Mywebser", targetNamespace = "http://namespace") @MTOM(threshold = 2048) @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) public class Mywebser { @WebMethod(operationName = "doStreaming", action = "urn:doStreaming") @WebResult(name = "return") public ResultInfo doStreaming(String username, String pwd, @XmlMimeType("application/octet-stream") DataHandler data, boolean overw){ ... } } The generated client side looks like this: @WebMethod(action = "urn:doStreaming") @WebResult(targetNamespace = "") @RequestWrapper(localName = "doStreaming", targetNamespace = "http://namespace", className = "com.mypack.client.doStreaming") @ResponseWrapper(localName = "doStreamingResponse", targetNamespace = "http://namespace", className = "com.mypack.client.doStreamingResponse") public ResultInfo doStreaming( @WebParam(name = "arg0", targetNamespace = "") String arg0, @WebParam(name = "arg1", targetNamespace = "") String arg1, @WebParam(name = "arg2", targetNamespace = "") DataHandler arg2, @WebParam(name = "arg3", targetNamespace = "") boolean arg3); By using it this way it uses streaming properly (verified we can pass an argument of 80mb when the jvm had less allowed. MywebserService serv = ...; Mywebser wso = serv.getMywebserPort(new MTOMFeature()); Map<String, Object> ctxt = ((BindingProvider) wso).getRequestContext(); ctxt.put(JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, 8192); DataHandler dataHandler = new DataHandler(new FileDataSource("c:\\temp\\A.dat")); arcres = wso.doStreaming("a", "b", dataHandler, true); We generate a clienet for .net, with VS2008, using "Add Web Reference", we get this C# code: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:doStreaming",RequestNamespace="http://namespace",ResponseNamespace="http://namespace",Use=System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [return: System.Xml.Serialization.XmlElementAttribute("return",Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public ResultInfo doStreaming( [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg0, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg1, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified,DataType="base64Binary")] byte[] arg2, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool arg3) Apparently this is not using streaming? The type base64Binary of arg2 seems not the right one? In java it's a DataHandler. By testing it with low memory on the java side we can see it is not using streaming as it fails with OOM. Does someone knows if this is possible, and if so how? Our environment: server: jdk1.6, jaxws 2.1.7 client: C# 2.0, visual studio 2008

    Read the article

  • What is the fastest cyclic synchronization in Java (ExecutorService vs. CyclicBarrier vs. X)?

    - by Alex Dunlop
    Which Java synchronization construct is likely to provide the best performance for a concurrent, iterative processing scenario with a fixed number of threads like the one outlined below? After experimenting on my own for a while (using ExecutorService and CyclicBarrier) and being somewhat surprised by the results, I would be grateful for some expert advice and maybe some new ideas. Existing questions here do not seem to focus primarily on performance, hence this new one. Thanks in advance! The core of the app is a simple iterative data processing algorithm, parallelized to the spread the computational load across 8 cores on a Mac Pro, running OS X 10.6 and Java 1.6.0_07. The data to be processed is split into 8 blocks and each block is fed to a Runnable to be executed by one of a fixed number of threads. Parallelizing the algorithm was fairly straightforward, and it functionally works as desired, but its performance is not yet what I think it could be. The app seems to spend a lot of time in system calls synchronizing, so after some profiling I wonder whether I selected the most appropriate synchronization mechanism(s). A key requirement of the algorithm is that it needs to proceed in stages, so the threads need to sync up at the end of each stage. The main thread prepares the work (very low overhead), passes it to the threads, lets them work on it, then proceeds when all threads are done, rearranges the work (again very low overhead) and repeats the cycle. The machine is dedicated to this task, Garbage Collection is minimized by using per-thread pools of pre-allocated items, and the number of threads can be fixed (no incoming requests or the like, just one thread per CPU core). V1 - ExecutorService My first implementation used an ExecutorService with 8 worker threads. The program creates 8 tasks holding the work and then lets them work on it, roughly like this: // create one thread per CPU executorService = Executors.newFixedThreadPool( 8 ); ... // now process data in cycles while( ...) { // package data into 8 work items ... // create one Callable task per work item ... // submit the Callables to the worker threads executorService.invokeAll( taskList ); } This works well functionally (it does what it should), and for very large work items indeed all 8 CPUs become highly loaded, as much as the processing algorithm would be expected to allow (some work items will finish faster than others, then idle). However, as the work items become smaller (and this is not really under the program's control), the user CPU load shrinks dramatically: blocksize | system | user | cycles/sec 256k 1.8% 85% 1.30 64k 2.5% 77% 5.6 16k 4% 64% 22.5 4096 8% 56% 86 1024 13% 38% 227 256 17% 19% 420 64 19% 17% 948 16 19% 13% 1626 Legend: - block size = size of the work item (= computational steps) - system = system load, as shown in OS X Activity Monitor (red bar) - user = user load, as shown in OS X Activity Monitor (green bar) - cycles/sec = iterations through the main while loop, more is better The primary area of concern here is the high percentage of time spent in the system, which appears to be driven by thread synchronization calls. As expected, for smaller work items, ExecutorService.invokeAll() will require relatively more effort to sync up the threads versus the amount of work being performed in each thread. But since ExecutorService is more generic than it would need to be for this use case (it can queue tasks for threads if there are more tasks than cores), I though maybe there would be a leaner synchronization construct. V2 - CyclicBarrier The next implementation used a CyclicBarrier to sync up the threads before receiving work and after completing it, roughly as follows: main() { // create the barrier barrier = new CyclicBarrier( 8 + 1 ); // create Runable for thread, tell it about the barrier Runnable task = new WorkerThreadRunnable( barrier ); // start the threads for( int i = 0; i < 8; i++ ) { // create one thread per core new Thread( task ).start(); } while( ... ) { // tell threads about the work ... // N threads + this will call await(), then system proceeds barrier.await(); // ... now worker threads work on the work... // wait for worker threads to finish barrier.await(); } } class WorkerThreadRunnable implements Runnable { CyclicBarrier barrier; WorkerThreadRunnable( CyclicBarrier barrier ) { this.barrier = barrier; } public void run() { while( true ) { // wait for work barrier.await(); // do the work ... // wait for everyone else to finish barrier.await(); } } } Again, this works well functionally (it does what it should), and for very large work items indeed all 8 CPUs become highly loaded, as before. However, as the work items become smaller, the load still shrinks dramatically: blocksize | system | user | cycles/sec 256k 1.9% 85% 1.30 64k 2.7% 78% 6.1 16k 5.5% 52% 25 4096 9% 29% 64 1024 11% 15% 117 256 12% 8% 169 64 12% 6.5% 285 16 12% 6% 377 For large work items, synchronization is negligible and the performance is identical to V1. But unexpectedly, the results of the (highly specialized) CyclicBarrier seem MUCH WORSE than those for the (generic) ExecutorService: throughput (cycles/sec) is only about 1/4th of V1. A preliminary conclusion would be that even though this seems to be the advertised ideal use case for CyclicBarrier, it performs much worse than the generic ExecutorService. V3 - Wait/Notify + CyclicBarrier It seemed worth a try to replace the first cyclic barrier await() with a simple wait/notify mechanism: main() { // create the barrier // create Runable for thread, tell it about the barrier // start the threads while( ... ) { // tell threads about the work // for each: workerThreadRunnable.setWorkItem( ... ); // ... now worker threads work on the work... // wait for worker threads to finish barrier.await(); } } class WorkerThreadRunnable implements Runnable { CyclicBarrier barrier; @NotNull volatile private Callable<Integer> workItem; WorkerThreadRunnable( CyclicBarrier barrier ) { this.barrier = barrier; this.workItem = NO_WORK; } final protected void setWorkItem( @NotNull final Callable<Integer> callable ) { synchronized( this ) { workItem = callable; notify(); } } public void run() { while( true ) { // wait for work while( true ) { synchronized( this ) { if( workItem != NO_WORK ) break; try { wait(); } catch( InterruptedException e ) { e.printStackTrace(); } } } // do the work ... // wait for everyone else to finish barrier.await(); } } } Again, this works well functionally (it does what it should). blocksize | system | user | cycles/sec 256k 1.9% 85% 1.30 64k 2.4% 80% 6.3 16k 4.6% 60% 30.1 4096 8.6% 41% 98.5 1024 12% 23% 202 256 14% 11.6% 299 64 14% 10.0% 518 16 14.8% 8.7% 679 The throughput for small work items is still much worse than that of the ExecutorService, but about 2x that of the CyclicBarrier. Eliminating one CyclicBarrier eliminates half of the gap. V4 - Busy wait instead of wait/notify Since this app is the primary one running on the system and the cores idle anyway if they're not busy with a work item, why not try a busy wait for work items in each thread, even if that spins the CPU needlessly. The worker thread code changes as follows: class WorkerThreadRunnable implements Runnable { // as before final protected void setWorkItem( @NotNull final Callable<Integer> callable ) { workItem = callable; } public void run() { while( true ) { // busy-wait for work while( true ) { if( workItem != NO_WORK ) break; } // do the work ... // wait for everyone else to finish barrier.await(); } } } Also works well functionally (it does what it should). blocksize | system | user | cycles/sec 256k 1.9% 85% 1.30 64k 2.2% 81% 6.3 16k 4.2% 62% 33 4096 7.5% 40% 107 1024 10.4% 23% 210 256 12.0% 12.0% 310 64 11.9% 10.2% 550 16 12.2% 8.6% 741 For small work items, this increases throughput by a further 10% over the CyclicBarrier + wait/notify variant, which is not insignificant. But it is still much lower-throughput than V1 with the ExecutorService. V5 - ? So what is the best synchronization mechanism for such a (presumably not uncommon) problem? I am weary of writing my own sync mechanism to completely replace ExecutorService (assuming that it is too generic and there has to be something that can still be taken out to make it more efficient). It is not my area of expertise and I'm concerned that I'd spend a lot of time debugging it (since I'm not even sure my wait/notify and busy wait variants are correct) for uncertain gain. Any advice would be greatly appreciated.

    Read the article

  • Using MonadPlus in FRP.Reactive.FieldTrip

    - by ony
    I'm studying FRP at this moment through FieldTrip adaptor. And hit the problem with strange way of frames scheduling and integration. So now I'm trying to build own marker Event for aligning Behaviour stepping. So... flipflop :: Behavior String flipflop = stepper "none" (xflip 2) where xflip t0 = do t <- withTimeE_ (atTime t0) return "flip" `mplus` xflop (t+3) xflop t0 = do t <- withTimeE_ (atTime t0) return "flop" `mplus` xflip (t+2) txtGeom = ((uscale2 (0.5::Float) *%) . utext . show <$>) main = anim2 (txtGeom . pure flipflop) Questions is: Why this example leads to memory leak? Is there safe way to build sequence of events where each next one is scheduled depending on previous?

    Read the article

  • Is VS 2010 SharePoint functionality good enough to replace WSP Builder?

    - by JL
    I have been using WSP builder up until now with VS 2008. I recently upgraded my IDE to VS 2010, and have heard that VS 2010 now includes functionality to work with MOSS directly. If you guys have had any experience with this new MOSS functionality and have come from a WSP builder background I would like to hear what you think. Just to add more focus to my question, I am not interested in ease of deployment at this stage, only the ability to wrap up a WSP package, so I can ship this off to production machines. So can VS 2010 out of the box create WSP packages from class library projects, like WSP Builder does?

    Read the article

  • Create a Slide Show in Windows 7 Media Center

    - by DigitalGeekery
    Are you looking for a nice way to create and display a slide show from your photo collection? Today we’ll show you how to create a slide show, how to add music to it, and watch it from the comfort of your couch in Windows 7 Media Center. Create Slide Show Launch Windows 7 Media Center and click on the Picture Library tile found under Pictures and Videos.   In the Pictures Library, scroll across to slide shows and click on Create Slide show.   Enter a name for the slide show and click Next.   If you are using a Windows Media Center remote, click on the OK button to bring up the onscreen keyboard. Use the directional buttons to navigate across the keyboard and press OK to select each letter. Click Done when finished. Select Picture Library and click Next. Select the pictures to include in your slide show. If using a remote, navigate through the images and press OK to select. If you are using a mouse, simply click on the selections. When you are finished, click Next.    Now, we can review and edit the slide show. Click the up or down pointing arrows to move pictures up and down in the order.  (more intuitive titles would be helpful in this case as opposed to the randomly generated titles in the example below) If you are finished, click Create. You can also choose to go back and add music to your slide show. (or even more pictures) We’ll take a look at adding some music in our example. Click on the Add More button.   Add Music to Your Slide Show Here we’ll select Music Library to add a song. Click Next.   You’ll now be able to browse your Music Library to select songs for your slide show. Select your songs and click Next.   When you are finished adding Music and Pictures click Create.   Once your slide show is saved, you can play it any time by going to clicking on slide shows in the Picture Library, then selecting the slide show title. Select play slide show when you’re ready to enjoy your new production.   If you ever want to edit or delete the slide show, select it in the Picture Library, and scroll to Actions. You’ll see those option under additional commands. You have the option to Edit Slide Show, Burn a CD/DVD, or Delete. Editing Slide Show Settings Within Media Center, go to Tasks… Click on Pictures…   Then choose Slide Shows. From the Slide Show settings you have the option to Show pictures in random order, Show picture information, Show song information, and Use Pan and zoom effect. You can also adjust the length of time to display each picture, and change the background color. Be sure to click Save to apply and changes before exiting. If you choose to show picture information, the picture title, date, and star rating will be displayed in the top right.   If your slide show is accompanied by music and you choose to show song information, you will get a translucent overlay for a few seconds at the beginning of each song to indicate the song, album, and artist. One of the really cool things about creating a slide show in Windows 7 Media Center is you can complete the entire process using just a Media Center remote. Can’t get enough slide shows? Check out how to turn your desktop into a picture slide show in Windows 7. Similar Articles Productive Geek Tips Using Netflix Watchnow in Windows Vista Media Center (Gmedia)Add Color Coding to Windows 7 Media Center Program GuideIntegrate Boxee with Media Center in Windows 7Schedule Updates for Windows Media CenterTurn Your Desktop into a Picture Slideshow in Windows 7 TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Case Study – How to Optimize Popular Wordpress Sites Restore Hidden Updates in Windows 7 & Vista Iceland an Insurance Job? Find Downloads and Add-ins for Outlook Recycle ! Find That Elusive Icon with FindIcons

    Read the article

  • jQuery broken function after added new function

    - by Kyle Sevenoaks
    What's wrong here? The alert function was working until I added this new function to it. Is there anything I am doing wrong? It just simply doesn't fire the alert anymore. <input value="1" type="checkbox" name="salgsvilkar" id="checkbox2" style="float:left;" /> {literal} <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(function() { //checkbox $("#scrollwrap").click(function(){ $("#scrollwrap").toggleClass('highlight'); });? }); $(function(){ //button $("#fullfor_btn").click(function(e){ if(!$("#checkbox2").is(':checked') == false) { alert("Please accept the terms of sale."); e.preventDefault(); } }); }); </script> {/literal} <button type="submit" class="submit" name="{$method}" id="fullfor_btn" title="Fullfør bestillingen nå" value="">&nbsp;</button>

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >