Search Results

Search found 504 results on 21 pages for 'mysterious jean'.

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

  • ASP.NET AppDomain–What it is and why it’s important–Part 12 of 52 part series

    - by OWScott
    AppDomains are a silent mysterious part of ASP.NET and IIS.  It’s important for the web administrator to be aware of this building block of ASP.NET so that we can be aware of how changes to the system can affect production sites. While this series is targeted at the IIS and web administrator, this topic is useful for the ASP.NET programmer too. This is week 12 of a 52 week series on various web administration related tasks. Past and future videos can be found here.

    Read the article

  • Can't work out security

    - by user215351
    I installed Ubuntu on puter I am the only user I alone use. I was trying a to find out how to repair hardware faults. Surprised to find I was not the owner and that there is a password that locks me out. I only set one password during set up so what is this mysterious password. As far as I'm concerned it is overdone on security, Im sick of authenticating every 3 seconds. I need a simpler system

    Read the article

  • Ottawa Code Camp 2010 pictures

    - by guybarrette
    The Ottawa Code Camp IT Day 2010 took place over the weekend.  With about 130 attendees, it was a great success according to Jean-René Roy, one of the organizers. Pictures are available here var addthis_pub="guybarrette";

    Read the article

  • Friday Fun: Carveola Incident

    - by Asian Angel
    Has it been a long and boring week at work? Then how about something to liven things up a bit? In this week’s game you receive orders to join a newly formed task force comprised of soldiers from allied and former enemy units at the end of World War 1. Your mission is to investigate strange sightings near a mysterious deserted trench line.HTG Explains: What’s the Difference Between the Windows 7 HomeGroups and XP-style Networking?Internet Explorer 9 Released: Here’s What You Need To KnowHTG Explains: How Does Email Work?

    Read the article

  • Friday Fun: Museum of Thieves

    - by Asian Angel
    In this week’s game you are lured to the mysterious Museum of Dunt where adventure and an evil force awaits. Can you find the differences in the museum’s strange, shifting rooms as you work your way through it or will the restless evil that dwells within escape? Make Your Own Windows 8 Start Button with Zero Memory Usage Reader Request: How To Repair Blurry Photos HTG Explains: What Can You Find in an Email Header?

    Read the article

  • Getting Better Page Rankings

    Do you know how the Google Page Ranking system works? Most people do not. This could be because there are many issues that go into a page's ranking, including the mysterious algorithm we often hear about.

    Read the article

  • Le Gouvernement français fait le choix du Logiciel Libre pour l'Etat, que pensez-vous de cette décision ?

    Le Gouvernement français fait le choix du Logiciel Libre pour l'Etat Que pensez-vous de cette décision ? Edit de Gordon Fowler, le 27/09/12 : ajout des avantages, des limites et des questions de la circulaire Dans une circulaire adressée à tous les membres du gouvernement intitulée "Orientations pour l'usage des logiciels libres dans l'administration", le Premier ministre, Jean-Marc Ayrault, a recommandé l'usage des logiciels libres tout en soulignant leurs avantages dans différents domaines. Cette initiative, faisant suite à la circulaire Fillon sur la généralisation de l'usage des formats ouverts, est fruit d'un travail animé par la d...

    Read the article

  • Tutorial: Why Use GRUB2? Good Question! (part 3)

    As we come to the end of Akkana Peck's excellent series on mastering GRUB2, it's not clear what advantages it has over legacy GRUB, or even good old LILO. It seems it's gone backwards. In today's installment we learn how to translate some common and mysterious error messages, and how to manage a multi-boot system with GRUB2.

    Read the article

  • Why Use GRUB2? Good Question! (part 3)

    <b>Linux Planet:</b> "As we come to the end of Akkana Peck's excellent series on mastering GRUB2, it's not clear what advantages it has over legacy GRUB, or even good old LILO. It seems it's gone backwards. In today's installment we learn how to translate some common and mysterious error messages, and how to manage a multi-boot system with GRUB2."

    Read the article

  • Thoughts and rambling on the X protocol

    <b>jd:/dev/blog:</b> "Two years ago, while working on awesome, I joined the Freedesktop initiative to work on XCB. I had to learn the arcane of the X11 protocol and all the mysterious and old world that goes with it."

    Read the article

  • Transform Your Desktop with the Transformers 3 Theme for Windows 7

    - by Asian Angel
    The Transformers are back once again and this time they have to deal with the effects of a mysterious event from the past. Bring the excitement of their latest adventure to your desktop with the Transformers Theme for Windows 7. Download the Transformers 3 Theme [via Softpedia] What is a Histogram, and How Can I Use it to Improve My Photos?How To Easily Access Your Home Network From Anywhere With DDNSHow To Recover After Your Email Password Is Compromised

    Read the article

  • How to display different value with ComboBoxTableCell?

    - by Philippe Jean
    I try to use ComboxBoxTableCell without success. The content of the cell display the right value for the attribute of an object. But when the combobox is displayed, all items are displayed with the toString object method and not the attribute. I tryed to override updateItem of ComboBoxTableCell or to provide a StringConverter but nothing works. Do you have some ideas to custom comboxbox list display in a table cell ? I put a short example below to see quickly the problem. Execute the app and click in the cell, you will see the combobox with toString value of the object. package javafx2; import javafx.application.Application; import javafx.beans.property.adapter.JavaBeanObjectPropertyBuilder; import javafx.beans.value.ObservableValue; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn.CellDataFeatures; import javafx.scene.control.TableView; import javafx.scene.control.cell.ComboBoxTableCell; import javafx.stage.Stage; import javafx.util.Callback; import javafx.util.StringConverter; public class ComboBoxTableCellTest extends Application { public class Product { private String name; public Product(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } } public class Command { private Integer quantite; private Product product; public Command(Product product, Integer quantite) { this.product = product; this.quantite = quantite; } public Integer getQuantite() { return quantite; } public void setQuantite(Integer quantite) { this.quantite = quantite; } public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } } public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { Product p1 = new Product("Product 1"); Product p2 = new Product("Product 2"); final ObservableList<Product> products = FXCollections.observableArrayList(p1, p2); ObservableList<Command> commands = FXCollections.observableArrayList(new Command(p1, 20)); TableView<Command> tv = new TableView<Command>(); tv.setItems(commands); TableColumn<Command, Product> tc = new TableColumn<Command, Product>("Product"); tc.setMinWidth(140); tc.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Command,Product>, ObservableValue<Product>>() { @Override public ObservableValue<Product> call(CellDataFeatures<Command, Product> cdf) { try { JavaBeanObjectPropertyBuilder<Product> jbdpb = JavaBeanObjectPropertyBuilder.create(); jbdpb.bean(cdf.getValue()); jbdpb.name("product"); return (ObservableValue) jbdpb.build(); } catch (NoSuchMethodException e) { System.err.println(e.getMessage()); } return null; } }); final StringConverter<Product> converter = new StringConverter<ComboBoxTableCellTest.Product>() { @Override public String toString(Product p) { return p.getName(); } @Override public Product fromString(String s) { // TODO Auto-generated method stub return null; } }; tc.setCellFactory(new Callback<TableColumn<Command,Product>, TableCell<Command,Product>>() { @Override public TableCell<Command, Product> call(TableColumn<Command, Product> tc) { return new ComboBoxTableCell<Command, Product>(converter, products) { @Override public void updateItem(Product product, boolean empty) { super.updateItem(product, empty); if (product != null) { setText(product.getName()); } } }; } }); tv.getColumns().add(tc); tv.setEditable(true); Scene scene = new Scene(tv, 140, 200); stage.setScene(scene); stage.show(); } }

    Read the article

  • Ninject WithConstructorArgument : No matching bindings are available, and the type is not self-bindable

    - by Jean-François Beauchamp
    My understanding of WithConstructorArgument is probably erroneous, because the following is not working: I have a service, lets call it MyService, whose constructor is taking multiple objects, and a string parameter called testEmail. For this string parameter, I added the following Ninject binding: string testEmail = "[email protected]"; kernel.Bind<IMyService>().To<MyService>().WithConstructorArgument("testEmail", testEmail); However, when executing the following line of code, I get an exception: var myService = kernel.Get<MyService>(); Here is the exception I get: Error activating string No matching bindings are available, and the type is not self-bindable. Activation path: 2) Injection of dependency string into parameter testEmail of constructor of type MyService 1) Request for MyService Suggestions: 1) Ensure that you have defined a binding for string. 2) If the binding was defined in a module, ensure that the module has been loaded into the kernel. 3) Ensure you have not accidentally created more than one kernel. 4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name. 5) If you are using automatic module loading, ensure the search path and filters are correct. What am I doing wrong here? UPDATE: Here is the MyService constructor: [Ninject.Inject] public MyService(IMyRepository myRepository, IMyEventService myEventService, IUnitOfWork unitOfWork, ILoggingService log, IEmailService emailService, IConfigurationManager config, HttpContextBase httpContext, string testEmail) { this.myRepository = myRepository; this.myEventService = myEventService; this.unitOfWork = unitOfWork; this.log = log; this.emailService = emailService; this.config = config; this.httpContext = httpContext; this.testEmail = testEmail; } I have standard bindings for all the constructor parameter types. Only 'string' has no binding, and HttpContextBase has a binding that is a bit different: kernel.Bind<HttpContextBase>().ToMethod(context => new HttpContextWrapper(new HttpContext(new MyHttpRequest("", "", "", null, new StringWriter())))); and MyHttpRequest is defined as follows: public class MyHttpRequest : SimpleWorkerRequest { public string UserHostAddress; public string RawUrl; public MyHttpRequest(string appVirtualDir, string appPhysicalDir, string page, string query, TextWriter output) : base(appVirtualDir, appPhysicalDir, page, query, output) { this.UserHostAddress = "127.0.0.1"; this.RawUrl = null; } }

    Read the article

  • JsTree v1.0 - How to manipulate effectively the data from the backend to render the trees and operate correctly?

    - by Jean Paul
    Backend info: PHP 5 / MySQL URL: http://github.com/downloads/vakata/jstree/jstree_pre1.0_fix_1.zip Table structure for table discussions_tree -- CREATE TABLE IF NOT EXISTS `discussions_tree` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `label` varchar(16) DEFAULT NULL, `position` bigint(20) unsigned NOT NULL DEFAULT '0', `left` bigint(20) unsigned NOT NULL DEFAULT '0', `right` bigint(20) unsigned NOT NULL DEFAULT '0', `level` bigint(20) unsigned NOT NULL DEFAULT '0', `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, `h_label` varchar(16) NOT NULL DEFAULT '', `fulllabel` varchar(255) DEFAULT NULL, UNIQUE KEY `uidx_3` (`id`), KEY `idx_1` (`user_id`), KEY `idx_2` (`parent_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; /*The first element should in my understanding not even be shown*/ INSERT INTO `discussions_tree` (`id`, `parent_id`, `user_id`, `label`, `position`, `left`, `right`, `level`, `type`, `h_label`, `fulllabel`) VALUES (0, 0, 0, 'Contacts', 0, 1, 1, 0, NULL, '', NULL); INSERT INTO `discussions_tree` (`id`, `parent_id`, `user_id`, `label`, `position`, `left`, `right`, `level`, `type`, `h_label`, `fulllabel`) VALUES (1, 0, 0, 'How to Tag', 1, 2, 2, 0, 'drive', '', NULL); Front End : I've simplified the logic, it has 6 trees actually inside of a panel and that works fine $array = array("Discussions"); $id_arr = array("d"); $nid = 0; foreach ($array as $k=> $value) { $nid++; ?> <li id="<?=$value?>" class="label"> <a href='#<?=$value?>'><span> <?=$value?> </span></a> <div class="sub-menu" style="height:auto; min-height:120px; background-color:#E5E5E5" > <div class="menu" id="menu_<?=$id_arr[$k]?>" style="position:relative; margin-left:56%"> <img src="./js/jsTree/create.png" alt="" id="create" title="Create" > <img src="./js/jsTree/rename.png" alt="" id="rename" title="Rename" > <img src="./js/jsTree/remove.png" alt="" id="remove" title="Delete"> <img src="./js/jsTree/cut.png" alt="" id="cut" title="Cut" > <img src="./js/jsTree/copy.png" alt="" id="copy" title="Copy"> <img src="./js/jsTree/paste.png" alt="" id="paste" title="Paste"> </div> <div id="<?=$id_arr[$k]?>" class="jstree_container"></div> </div> </li> <!-- JavaScript neccessary for this tree : <?=$value?> --> <script type="text/javascript" > jQuery(function ($) { $("#<?=$id_arr[$k]?>").jstree({ // List of active plugins used "plugins" : [ "themes", "json_data", "ui", "crrm" , "hotkeys" , "types" , "dnd", "contextmenu"], // "ui" :{ "initially_select" : ["#node_"+ $nid ] } , "crrm": { "move": { "always_copy": "multitree" }, "input_width_limit":128 }, "core":{ "strings":{ "new_node" : "New Tag" }}, "themes": {"theme": "classic"}, "json_data" : { "ajax" : { "url" : "./js/jsTree/server-<?=$id_arr[$k]?>.php", "data" : function (n) { // the result is fed to the AJAX request `data` option return { "operation" : "get_children", "id" : n.attr ? n.attr("id").replace("node_","") : 1, "state" : "", "user_id": <?=$uid?> }; } } } , "types" : { "max_depth" : -1, "max_children" : -1, "types" : { // The default type "default" : { "hover_node":true, "valid_children" : [ "default" ], }, // The `drive` nodes "drive" : { // can have files and folders inside, but NOT other `drive` nodes "valid_children" : [ "default", "folder" ], "hover_node":true, "icon" : { "image" : "./js/jsTree/root.png" }, // those prevent the functions with the same name to be used on `drive` nodes.. internally the `before` event is used "start_drag" : false, "move_node" : false, "remove_node" : false } } }, "contextmenu" : { "items" : customMenu , "select_node": true} }) //Hover function binded to jstree .bind("hover_node.jstree", function (e, data) { $('ul li[rel="drive"], ul li[rel="default"], ul li[rel=""]').each(function(i) { $(this).find("a").attr('href', $(this).attr("id")+".php" ); }) }) //Create function binded to jstree .bind("create.jstree", function (e, data) { $.post( "./js/jsTree/server-<?=$id_arr[$k]?>.php", { "operation" : "create_node", "id" : data.rslt.parent.attr("id").replace("node_",""), "position" : data.rslt.position, "label" : data.rslt.name, "href" : data.rslt.obj.attr("href"), "type" : data.rslt.obj.attr("rel"), "user_id": <?=$uid?> }, function (r) { if(r.status) { $(data.rslt.obj).attr("id", "node_" + r.id); } else { $.jstree.rollback(data.rlbk); } } ); }) //Remove operation .bind("remove.jstree", function (e, data) { data.rslt.obj.each(function () { $.ajax({ async : false, type: 'POST', url: "./js/jsTree/server-<?=$id_arr[$k]?>.php", data : { "operation" : "remove_node", "id" : this.id.replace("node_",""), "user_id": <?=$uid?> }, success : function (r) { if(!r.status) { data.inst.refresh(); } } }); }); }) //Rename operation .bind("rename.jstree", function (e, data) { data.rslt.obj.each(function () { $.ajax({ async : true, type: 'POST', url: "./js/jsTree/server-<?=$id_arr[$k]?>.php", data : { "operation" : "rename_node", "id" : this.id.replace("node_",""), "label" : data.rslt.new_name, "user_id": <?=$uid?> }, success : function (r) { if(!r.status) { data.inst.refresh(); } } }); }); }) //Move operation .bind("move_node.jstree", function (e, data) { data.rslt.o.each(function (i) { $.ajax({ async : false, type: 'POST', url: "./js/jsTree/server-<?=$id_arr[$k]?>.php", data : { "operation" : "move_node", "id" : $(this).attr("id").replace("node_",""), "ref" : data.rslt.cr === -1 ? 1 : data.rslt.np.attr("id").replace("node_",""), "position" : data.rslt.cp + i, "label" : data.rslt.name, "copy" : data.rslt.cy ? 1 : 0, "user_id": <?=$uid?> }, success : function (r) { if(!r.status) { $.jstree.rollback(data.rlbk); } else { $(data.rslt.oc).attr("id", "node_" + r.id); if(data.rslt.cy && $(data.rslt.oc).children("UL").length) { data.inst.refresh(data.inst._get_parent(data.rslt.oc)); } } } }); }); }); // This is for the context menu to bind with operations on the right clicked node function customMenu(node) { // The default set of all items var control; var items = { createItem: { label: "Create", action: function (node) { return {createItem: this.create(node) }; } }, renameItem: { label: "Rename", action: function (node) { return {renameItem: this.rename(node) }; } }, deleteItem: { label: "Delete", action: function (node) { return {deleteItem: this.remove(node) }; }, "separator_after": true }, copyItem: { label: "Copy", action: function (node) { $(node).addClass("copy"); return {copyItem: this.copy(node) }; } }, cutItem: { label: "Cut", action: function (node) { $(node).addClass("cut"); return {cutItem: this.cut(node) }; } }, pasteItem: { label: "Paste", action: function (node) { $(node).addClass("paste"); return {pasteItem: this.paste(node) }; } } }; // We go over all the selected items as the context menu only takes action on the one that is right clicked $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).each(function(index,element) { if ( $(element).attr("id") != $(node).attr("id") ) { // Let's deselect all nodes that are unrelated to the context menu -- selected but are not the one right clicked $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); } }); //if any previous click has the class for copy or cut $("#<?=$id_arr[$k]?>").find("li").each(function(index,element) { if ($(element) != $(node) ) { if( $(element).hasClass("copy") || $(element).hasClass("cut") ) control=1; } else if( $(node).hasClass("cut") || $(node).hasClass("copy")) { control=0; } }); //only remove the class for cut or copy if the current operation is to paste if($(node).hasClass("paste") ) { control=0; // Let's loop through all elements and try to find if the paste operation was done already $("#<?=$id_arr[$k]?>").find("li").each(function(index,element) { if( $(element).hasClass("copy") ) $(this).removeClass("copy"); if ( $(element).hasClass("cut") ) $(this).removeClass("cut"); if ( $(element).hasClass("paste") ) $(this).removeClass("paste"); }); } switch (control) { //Remove the paste item from the context menu case 0: switch ($(node).attr("rel")) { case "drive": delete items.renameItem; delete items.deleteItem; delete items.cutItem; delete items.copyItem; delete items.pasteItem; break; case "default": delete items.pasteItem; break; } break; //Remove the paste item from the context menu only on the node that has either copy or cut added class case 1: if( $(node).hasClass("cut") || $(node).hasClass("copy") ) { switch ($(node).attr("rel")) { case "drive": delete items.renameItem; delete items.deleteItem; delete items.cutItem; delete items.copyItem; delete items.pasteItem; break; case "default": delete items.pasteItem; break; } } else //Re-enable it on the clicked node that does not have the cut or copy class { switch ($(node).attr("rel")) { case "drive": delete items.renameItem; delete items.deleteItem; delete items.cutItem; delete items.copyItem; break; } } break; //initial state don't show the paste option on any node default: switch ($(node).attr("rel")) { case "drive": delete items.renameItem; delete items.deleteItem; delete items.cutItem; delete items.copyItem; delete items.pasteItem; break; case "default": delete items.pasteItem; break; } break; } return items; } $("#menu_<?=$id_arr[$k]?> img").hover( function () { $(this).css({'cursor':'pointer','outline':'1px double teal'}) }, function () { $(this).css({'cursor':'none','outline':'1px groove transparent'}) } ); $("#menu_<?=$id_arr[$k]?> img").click(function () { switch(this.id) { //Create only the first element case "create": if ( $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).length ) { $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).each(function(index,element){ switch(index) { case 0: $("#<?=$id_arr[$k]?>").jstree("create", '#'+$(element).attr("id"), null, /*{attr : {href: '#' }}*/null ,null, false); break; default: $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); break; } }); } else { $.facebox('<p class=\'p_inner error bold\'>A selection needs to be made to work with this operation'); setTimeout(function(){ $.facebox.close(); }, 2000); } break; //REMOVE case "remove": if ( $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).length ) { $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).each(function(index,element){ //only execute if the current node is not the first one (drive) if( $(element).attr("id") != $("div.jstree > ul > li").first().attr("id") ) { $("#<?=$id_arr[$k]?>").jstree("remove",'#'+$(element).attr("id")); } else $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); }); } else { $.facebox('<p class=\'p_inner error bold\'>A selection needs to be made to work with this operation'); setTimeout(function(){ $.facebox.close(); }, 2000); } break; //RENAME NODE only one selection case "rename": if ( $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).length ) { $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).each(function(index,element){ if( $(element).attr("id") != $("div.jstree > ul > li").first().attr("id") ) { switch(index) { case 0: $("#<?=$id_arr[$k]?>").jstree("rename", '#'+$(element).attr("id") ); break; default: $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); break; } } else $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); }); } else { $.facebox('<p class=\'p_inner error bold\'>A selection needs to be made to work with this operation'); setTimeout(function(){ $.facebox.close(); }, 2000); } break; //Cut case "cut": if ( $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).length ) { $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).each(function(index,element){ switch(index) { case 0: $("#<?=$id_arr[$k]?>").jstree("cut", '#'+$(element).attr("id")); $.facebox('<p class=\'p_inner teal\'>Operation "Cut" successfully done.<p class=\'p_inner teal bold\'>Where to place it?'); setTimeout(function(){ $.facebox.close(); $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id")); }, 2000); break; default: $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); break; } }); } else { $.facebox('<p class=\'p_inner error bold\'>A selection needs to be made to work with this operation'); setTimeout(function(){ $.facebox.close(); }, 2000); } break; //Copy case "copy": if ( $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).length ) { $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).each(function(index,element){ switch(index) { case 0: $("#<?=$id_arr[$k]?>").jstree("copy", '#'+$(element).attr("id")); $.facebox('<p class=\'p_inner teal\'>Operation "Copy": Successfully done.<p class=\'p_inner teal bold\'>Where to place it?'); setTimeout(function(){ $.facebox.close(); $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); }, 2000); break; default: $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); break; } }); } else { $.facebox('<p class=\'p_inner error bold\'>A selection needs to be made to work with this operation'); setTimeout(function(){ $.facebox.close(); }, 2000); } break; case "paste": if ( $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).length ) { $.jstree._reference("#<?=$id_arr[$k]?>").get_selected(false, true).each(function(index,element){ switch(index) { case 0: $("#<?=$id_arr[$k]?>").jstree("paste", '#'+$(element).attr("id")); break; default: $("#<?=$id_arr[$k]?>").jstree("deselect_node", '#'+$(element).attr("id") ); break; } }); } else { $.facebox('<p class=\'p_inner error bold\'>A selection needs to be made to work with this operation'); setTimeout(function(){ $.facebox.close(); }, 2000); } break; } }); <? } ?> server.php $path='../../../..'; require_once "$path/phpfoo/dbif.class"; require_once "$path/global.inc"; // Database config & class $db_config = array( "servername"=> $dbHost, "username" => $dbUser, "password" => $dbPW, "database" => $dbName ); if(extension_loaded("mysqli")) require_once("_inc/class._database_i.php"); else require_once("_inc/class._database.php"); //Tree class require_once("_inc/class.ctree.php"); $dbLink = new dbif(); $dbErr = $dbLink->connect($dbName,$dbUser,$dbPW,$dbHost); $jstree = new json_tree(); if(isset($_GET["reconstruct"])) { $jstree->_reconstruct(); die(); } if(isset($_GET["analyze"])) { echo $jstree->_analyze(); die(); } $table = '`discussions_tree`'; if($_REQUEST["operation"] && strpos($_REQUEST["operation"], "_") !== 0 && method_exists($jstree, $_REQUEST["operation"])) { foreach($_REQUEST as $k => $v) { switch($k) { case 'user_id': //We are passing the user_id from the $_SESSION on each request and trying to pick up the min and max value from the table that matches the 'user_id' $sql = "SELECT max(`right`) , min(`left`) FROM $table WHERE `user_id`=$v"; //If the select does not return any value then just let it be :P if (!list($right, $left)=$dbLink->getRow($sql)) { $sql = $dbLink->dbSubmit("UPDATE $table SET `user_id`=$v WHERE `id` = 1 AND `parent_id` = 0"); $sql = $dbLink->dbSubmit("UPDATE $table SET `user_id`=$v WHERE `parent_id` = 1 AND `label`='How to Tag' "); } else { $sql = $dbLink->dbSubmit("UPDATE $table SET `user_id`=$v, `right`=$right+2 WHERE `id` = 1 AND `parent_id` = 0"); $sql = $dbLink->dbSubmit("UPDATE $table SET `user_id`=$v, `left`=$left+1, `right`=$right+1 WHERE `parent_id` = 1 AND `label`='How to Tag' "); } break; } } header("HTTP/1.0 200 OK"); header('Content-type: application/json; charset=utf-8'); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Pragma: no-cache"); echo $jstree->{$_REQUEST["operation"]}($_REQUEST); die(); } header("HTTP/1.0 404 Not Found"); ?> The problem: DND *(Drag and Drop) works, Delete works, Create works, Rename works, but Copy, Cut and Paste don't work

    Read the article

  • willRotateToInterfaceOrientation:duration: not called for iOS5 after dismissing from modal

    - by Jean-Denis Muys
    My main UIViewController overrides willRotateToInterfaceOrientation:duration: to adapt the background view for the correct orientation. This works fine when staying within the view. But in my app, the result of some user actions can lead to presenting another "daughter" UIViewController. When the user is done with that daughter UIViewController, she normally returns to the main view controller. My code calls dismissModalViewControllerAnimated: to do so. The issue occurs when the user changes the iPad orientation while the daughter UIViewController is on screen. Then, the main UIViewController will never see any call to willRotateToInterfaceOrientation:duration: and its background view will be incorrect. This setup works fine in iOS 4: the iOS 4 implementation of dismissModalViewControllerAnimated: calls UIWindow's _setRotatableClient:toOrientation:updateStatusBar:duration:force: which calls willRotateToInterfaceOrientation:duration: for the switched in UIViewController. Apparently , this behavior changed for iOS 5. How am I expected to implemented orientation changes while my view is off screen under iOS5? Am I supposed to query the current orientation in viewWillAppear: for example?

    Read the article

  • Infinite loop when adding CATiledLayer to UIView

    - by Jean
    I have a UIView in which I add a CATiledLayer and implement 'drawLayer'. If I use a UIViewController and add the layer to a new subview of the controller, then everything is ok. If I however try to use a UIView to and do all the craetion and drawing within this, then I get a infinite loop at the point shown below when I add this view to a superview. 0x002cfafb <+0425> ja 0x2cfa23 <-[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:]+209> What am I missing?

    Read the article

  • C# Random Number Generator getting stuck in a cycle

    - by Jean Azzopardi
    Hi, I am using .NET to create an artificial life program and I am using C#'s pseudo random class defined in a Singleton. The idea is that if I use the same random number generator throughout the application, I could merely save the seed and then reload from the seed to recompute a certain interesting run. public sealed class RandomNumberGenerator : Random { private static readonly RandomNumberGenerator instance = new RandomNumberGenerator(); RandomNumberGenerator() { } public static RandomNumberGenerator Instance { get { return instance; } } } I also wanted a method that could give me two different random numbers. public static Tuple<int, int> TwoDifferentRandomNumbers(this Random rnd, int minValue, int maxValue) { if (minValue >= maxValue) throw new ArgumentOutOfRangeException("maxValue", "maxValue must be greater than minValue"); if (minValue + 1 == maxValue) return Tuple.Create<int, int>(minValue, maxValue); int rnd1 = rnd.Next(minValue, maxValue); int rnd2 = rnd.Next(minValue, maxValue); while (rnd1 == rnd2) { rnd2 = rnd.Next(minValue, maxValue); } return Tuple.Create<int, int>(rnd1, rnd2); } The problem is that sometimes rnd.Next(minValue,maxValuealways returns minValue. If I breakpoint at this point and try creating a double and setting it to rnd.NextDouble(), it returns 0.0. Anyone know why this is happening? I know that it is a pseudo random number generator, but frankly, I hadn't expected it to lock at 0. The random number generator is being accessed from multiple threads... could this be the source of the problem?

    Read the article

  • Detect and record a sound with python

    - by Jean-Pierre
    I'm using this program to record a sound in python: import pyaudio import wave import sys chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = "output.wav" p = pyaudio.PyAudio() stream = p.open(format = FORMAT, channels = CHANNELS, rate = RATE, input = True, frames_per_buffer = chunk) print "* recording" all = [] for i in range(0, RATE / chunk * RECORD_SECONDS): data = stream.read(chunk) all.append(data) print "* done recording" stream.close() p.terminate() write data to WAVE file data = ''.join(all) wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb') wf.setnchannels(CHANNELS) wf.setsampwidth(p.get_sample_size(FORMAT)) wf.setframerate(RATE) wf.writeframes(data) wf.close() I want to change the program to start recording when sound is detected by the sound card input. Probably should compare the input sound level in Chunk, but how do this?

    Read the article

  • Lazy load pages in UIScrollView

    - by jean
    I have a UIScrollView that contains large images and am using paging to scroll between images. In order to save memory, I am loading only one image before and after the currently visible one and loading/releasing new images after a scroll has completed. The problem occurs when one scrolls quickly and scrollViewDidEndDecelerating is not called. How can I detect continuous scrolling? I could check item location on every scrollViewDidScroll but this seems a bit heavy...

    Read the article

  • Image displays when clicked with multiple radio button groups

    - by Jean
    I'm creating a form that has seven different selection groups, most with radio buttons (ie: buns, cheese), a couple with check boxes (toppings). I need jQuery to differentiate the groups and display images when clicked. The value can't be part of the code as I use it as part of the php form in the next page. <html> <head> <script src="js/jquery-1.6.1.min.js" type="text/javascript"></script> </head> <body> <div id="myRadioGroup"> <input type="radio" name="cars" value="American" />Yellow American<br /> <input type="radio" name="cars" value="Swiss" />Jarlsberg Swiss<br /> <input type="radio" name="cars" value="Blue" />Blue<br /> <input type="radio" name="cars" value="Cheddar" />Aged Cheddar<br /> <div id="American" class="desc"><img class="item" src="images/american-cheese-slice.png"></div> <div id="Swiss" class="desc"><img class="item" src="images/swisscheese.png"></div> <div id="Blue" class="desc"><img class="item" src="images/bluecheese.png"></div> <div id="Cheddar" class="desc"><img class="item" src="images/agedcheddar.png"></div> </div> <div id="myBunGroup"> <input type="radio" name="buns" value="Whole Wheat" />Whole Wheat<br /> <input type="radio" name="buns" value="Classic" />Classic<br /> <input type="radio" name="buns" value="Gluten Free" />Gluten Free<br /> <input type="radio" name="buns" value="Wrap" />Wrap<br /> <div id="WholeWheat" class="desc"><img class="item" src="images/wholewheat.png"></div> <div id="Classic" class="desc"><img class="item" src="images/classic.png"></div> <div id="GlutenFree" class="desc"><img class="item" src="images/gf-buns.png"></div> <div id="Wrap" class="desc"><img class="item" src="images/tortilla.png"></div> </div> <div id="myToppingGroup"> </div> <!-- http://stackoverflow.com/questions/5940963/jquery-show-and-hide-divs-based-on-radio-button-click --> <script> $(document).ready(function() { $(".item").hide(); $("input[name$="['cars', 'buns']"]").click(function() { var test = $(this).val(); $(".item").hide(); $("#" + test).show(); }); }); </script> </body> </html>

    Read the article

  • Palm OS 5 development tools

    - by Jean Paul
    Hello. A few time ago I make a question about the Palm OS 5 development tools. Here I am again. I have seached a lot in Google and in many developer sites but all the links are broken and the sites are too old. Does anyone know a real tool in any OS (The best wold be for Windows or Linux) so I can develop, test and deploy software for Palm OS 5???? Thanks!!!!

    Read the article

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