Search Results

Search found 14958 results on 599 pages for 'non technical'.

Page 66/599 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • All non-prime factorings

    - by Tony Veijalainen
    Let's say we have numbers factors, for example 1260: >>> factors(1260) [2, 2, 3, 3, 5, 7] Which would be best way to do in Python combinations with every subproduct possible from these numbers, ie all factorings, not only prime factoring, with sum of factors less than max_sum? If I do combinations from the prime factors, I have to refactor remaining part of the product as I do not know the remaining part not in combination. Example results would be: [4, 3, 3, 5, 7] (one replacement) [3, 6, 14, 5] (two replacements)

    Read the article

  • Call to a member function fetch_assoc() on a non-object

    - by Joann
    I'm a super beginner. I did find related questions here but I think they're too advanced for my skills. :-( Here's my function: function get_fname($un){ $registerquery = $this->conn->query("SELECT f_name FROM tz_members WHERE usr='".$un."'"); while ($row = $registerquery->fetch_assoc()) { return $fname = $row[$un]; } } Any help plsss??

    Read the article

  • Google Image search base url for non ajax usage

    - by Mikulas Dite
    I would like to use Google Image search, however I can't find the proper url anywhere. Examples always refer to the web search, not the image search. I do not want to use javascript, I need the iamge at server side. Please, do not simply post links to the API documentation, but preferably the url itself. (Or the missing url argument etc). http://ajax.googleapis.com/ajax/services/search/web This is a web search - no changing web to image/img doesn't work.

    Read the article

  • Regular non-low energy bluetooth for IOS

    - by user3712524
    Ok, so I can't get my app to connect with a peripheral using bluetooth low-energy(my app is installed on an iPhone 5s and I have LightBlue installed on an iPhone 4S, simulating a peripheral. I also have light blue installed on the 5s, simulating a central, to verify that the two can connect and they do.) I have verified that the centralManager is instantiating and the State is powered on. So, my question is, is regular bluetooth still a viable option? Can I just use the GameKit API and go that route? Thanks in advance!

    Read the article

  • Why does "non exists" SQL query work and "not in" doesn't

    - by Josh
    I spent some time trying to figure out why this query isn't pulling the results i expected: SELECT * FROM NGS WHERE ESPSSN NOT IN (SELECT SSN FROM CENSUS) finally i tried writing the query another way and this ended up getting the expected results: SELECT * FROM NGS n WHERE NOT EXISTS (SELECT * FROM CENSUS WHERE SSN = n.ESPSSN) The first query seems more appropriate and "correct". I use "in" and "not in" all the time for similar selects and have never had a problem that i know of.

    Read the article

  • PHP unserialize fails with non-encoded characters?

    - by FFish
    $ser = 'a:2:{i:0;s:5:"héllö";i:1;s:5:"wörld";}'; // fails $ser2 = 'a:2:{i:0;s:5:"hello";i:1;s:5:"world";}'; // works $out = unserialize($ser); $out2 = unserialize($ser2); print_r($out); print_r($out2); echo "<hr>"; But why? Should I encode before serialzing than? How? I am using Javascript to write the serialized string to a hidden field, than PHP's $_POST In JS I have something like: function writeImgData() { var caption_arr = new Array(); $('.album img').each(function(index) { caption_arr.push($(this).attr('alt')); }); $("#hidden-field").attr("value", serializeArray(caption_arr)); };

    Read the article

  • Creating a form on non-gui thread

    - by luntain
    You can't access gui controls from a thread they were not created on, at least so says the message of an exception that is sometimes raised when you do it. Recently I was puzzled by seeing that forms created on background threads work just fine. My mental model was that all actions initiated by UI input is handled on the GUI thread. Clicking on a button on such a form should raise the dreaded exception (the form and all its controls were created on a background thread not the gui thread), but it doesn't. Something is wrong with my map. (*) well to be honest I have seen one problem where opening the standard open file dialog was blocking everything

    Read the article

  • apache redirect from non www to www

    - by user121196
    I have a mortgage calculator site that doesn't seem to redirect from mookal.com to www.mookal.com My apache config is as follows: RewriteEngine On ### re-direct to www RewriteCond %{http_host} !^www.mookal.com [nc] RewriteRule ^(.*)$ http://www.mookal.com/$1 [r=301,nc] what am I missing? thanks!

    Read the article

  • MySQL Non Index Queries Analysis

    - by Markii
    I'm using the log queries not using index but it logs all that use indexes but just more advanced or using IFs. Is there a parser or a program out there that can analyze the log and give me a literal output of saying "table.column should be a index" Thanks

    Read the article

  • best way to filter out non-representational elements

    - by nonano
    Hi there, I am using phpQuery in order to apply some twaks to editorial content. As its syntax is the same as jQuery, I consider this a dom scripting issue. To get rid of elements which are not representing anything, but wrapping other stuff (like the div in <div><p>blah</p></div> I came up with this selector: ['div:not([align][class][id][style][title][dir][lang][onclick][ondblclick][onmousedown] [onmouseup][onmouseover][onmousemove][onmouseout][onkeypress][onkeydown][onkeyup])'] which looks quite monstrous for a selector simply aming on Divs which just do not have any (valid) attribute. I guess there must be a more straight-forward way to accomplish that, right? Edit: Oh, and I just noticed that it even doesn't do wat I intended to ...

    Read the article

  • JQuery image gallery non functional fade effects

    - by Robin Knight
    Here is a simple image gallery script for fading in and out divs with background images. It is slow and not working properly. It would appear all images are appearing and disappearing together without any animation This gallery should fade each image out into the next one function gallery() { timerp = window.setInterval(function() { $('.cornerimg').fadeOut(2000); if ($('.cornerimg:visible') == $('.cornerimg').last()) { $('.cornerimg').first().fadeIn(2000); } else { $('.cornerimg').next().fadeIn(2000); }; }, 6000); } } Any ideas what has gone wrong with it?

    Read the article

  • model binding of non-sequential arrays

    - by user281180
    I am having a table in which i`m dynamically creating and deleting rows. How can I change the code such that the rows be added and deleted and the model info property filled accordingly. Bearing in mind that the rows can be dynamically created and deleted, I may have Info[0], Inf0[3], info[4]... My objective is to be able to bind the array even if it`s not in sequence. Model public class Person { public int[] Size { get; set; } public string[] Name { get; set; } public Info[]info { get; set; } } public class Info { public string Address { get; set; } public string Tel { get; set; } View <script type="text/javascript" language="javascript"> $(function () { var count = 1; $('#AddSize').live('click', function () { $("#divSize").append('</br><input type="text" id="Size" name="Size" value=""/><input type = "button" id="AddSize" value="Add"/>'); }); $('#AddName').live('click', function () { $("#divName").append('</br><input type="text" id="Name" name="Name" value=""/><input type = "button" id="AddName" value="Add"/>'); }); $('#AddRow').live('click', function () { $('#details').append('<tr><td>Address</td><td> <input type="text" name="Info[' + count + '].Address"/></td><td>Tel</td><td><input type="text" name="Info[' + count++ + '].Tel"/></td> <td><input type="button" id="AddRow" value="Add"/> </td></tr>'); }); }); </script> </head> <body> <form id="closeForm" action="<%=Url.Action("Create",new{Action="Create"}) %>" method="post" enctype="multipart/form-data"> <div id="divSize"> <input type="text" name="Size" value=""/> <input type="button" value="Add" id="AddSize" /> </div> <div id="divName"> <input type="text" name="Name" value=""/> <input type="button" value="Add" id="AddName" /> </div> <div id="Tab"> <table id="details"> <tr><td>Address</td><td> <input type="text" name="Info[0].Address"/></td><td>Tel</td><td><input type="text" name="Info[0].Tel"/></td> <td><input type="button" id="AddRow" value="Add"/> </td></tr> </table> </div> <input type="submit" value="Submit" /> </form> </body> } Controller public ActionResult Create(Person person) { return new EmptyResult(); }

    Read the article

  • How to make DataGrid Row really fully selectable (clicking on non-cell area)

    - by Samuel
    The question might be a little misleading. Here is a screenshot of a DataGrid that has some dummy values (code provided below) Is there a way to make the white area not covered by a cell clickable? My intention: I want to have full row selection. This can be achieved by SelectionUnit="FullRow" which is fine but how can I make the white area implicitly select the entire row without expanding available cells in width and avoiding code behind Here is the repro code: Xaml: <Window x:Class="DGVRowSelectTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" DataContext="{Binding RelativeSource={RelativeSource Self}}"> <DataGrid ItemsSource="{Binding Names}" SelectionMode="Single" SelectionUnit="FullRow" > </DataGrid> </Window> Dummy Code behind of it (just sets the two entries up) using System.Collections.Generic; using System.Windows; namespace DGVRowSelectTest { public partial class MainWindow : Window { private IList<KeyValuePair<string, string>> _names = new List<KeyValuePair<string, string>>{new KeyValuePair<string, string>("A1", "A2"),new KeyValuePair<string, string>("B1","B2")}; public IList<KeyValuePair<string, string>> Names{get { return _names; }set { _names = value; }} public MainWindow() { InitializeComponent(); } } }

    Read the article

  • Reusable non generic method for generic methods

    - by Jehof
    I have the following base interface public interface IHandler{ void Handle(IMessage message); } and an generic interface inheriting the base interface public interface IHandler<TMessage> : IHandler where TMessage : IMessage{ void Handle(TMessage message); } My classes can implement the interface IHandler<TMessage> mutiple times. IMessage is an base interface for messages and isn´t relevant here. Currently i´m implementing the interfaces as follows. public class ExampleHandler : IHandler<ExampleMessage>, IHandler<OtherExampleMessag>{ void IHandler.Handle(IMessage message){ ExampleMessage example = message as ExampleMessage; if (example != null) { Handle(example); } else { OtherExampleMessage otherExample = message as OtherExampleMessage; if (otherExample != null) { Handle(otherExample); } } public void Handle(ExampleMessage) { //handle message; } public void Handle(OtherExampleMessage) { //handle message; } } What bothers me is the way i have to implement the Handle(IMessage) method, cause in my opinion its many redundant code, and i have to extend the method each time when i implement a new IHandler<TMessage> interface on my class. What i´m looking for is a more generic way to implement the Handle(IMessage) method (maybe in a base class for Handlers), but i´m currently stuck how to do that.

    Read the article

  • Android onClickListener options and help on creating a non-static array adapter

    - by CoderInTraining
    I am trying to make an application that gets data dynamically and displays it in a listView. Here is my code that I have with static data. There are a couple of things I want to try and do and can't figure out how. MainActivity.java package text.example.project; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import android.app.ListActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends ListActivity { //declarations private boolean isItem; private ArrayAdapter<String> item1Adapter; private ArrayAdapter<String> item2Adapter; private ArrayAdapter<String> item3Adapter; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Collections.sort(ITEM1); Collections.sort(ITEM2); Collections.sort(ITEM3); item1Adapter = new ArrayAdapter<String>(this, R.layout.list_item, ITEM1); item2Adapter = new ArrayAdapter<String>(this, R.layout.list_item, ITEM2); item3Adapter = new ArrayAdapter<String>(this, R.layout.list_item, ITEM3); setListAdapter(item1Adapter); isItem = true; ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // When clicked, show a toast with the TextView text if (isItem) { //ITEM1.add("another\n\t" + Calendar.getInstance().getTime()); Collections.sort(ITEM1); item2Adapter.notifyDataSetChanged(); setListAdapter(item2Adapter); isItem = false; } else { item1Adapter.notifyDataSetChanged(); setListAdapter(item1Adapter); isItem = true; } Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show(); } }); } // need to turn dynamic static ArrayList<String> ITEM1 = new ArrayList<String> (Arrays.asList( "ITEM1-1", "ITEM1-2" )); static ArrayList<String> ITEM2 = new ArrayList<String> (Arrays.asList( "ITEM2-1", "ITEM2-2" )); static ArrayList<String> ITEM3 = new ArrayList<String> (Arrays.asList("ITEM3-1", "ITEM3-2")); } list_item.xml <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" android:textSize="16sp" > </TextView> What I want to do is first pull from a dynamic source. I need to do what is almost exactly like this tutorial... http://androiddevelopement.blogspot.in/2011/06/android-xml-parsing-tutorial-using.html ... however, I can't get the tutorial to work... I also would like to know how I can make the list item clicks so that if I click on "ITEM1-1" it goes to the menu "ITEM2-1" and "ITEM2-2". and if "ITEM1-2" is clicked, then it goes to the menu with "ITEM3-1" and "ITEM3-2"... I am totally a noob at this whole android development thing. So any suggestions would be great!

    Read the article

  • Non-CDN hosted jQuery caused some strange behaviour

    - by kwokwai
    Hi all, I was using this JQuery in this download link, and included it in the head tag of a HTML web page: <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> In a php web page, I got these few lines of codes: $.ajax({ url: 'http://mywebsite.com/site1/toavail/, type: "post", success: function(data) { // some more code here } }); When I tested the HTML page in IE 6, and 7, I saw the same warning message: "permission denied" When I tested it in Firefox 3, nothing was returned from the server web page. Later, I changed the JQuery source link to be: http://code.jquery.com/jquery-1.4.2.js I refreshed the web page, and I could saw the returned value then.

    Read the article

  • Strange difference between optimized/non optimized microsoft c++ code

    - by Anders Forsgren
    I have a c++ program with a method that looks something like this: int myMethod(int* arr1, int* arr2, int* index) { arr1--; arr2--; int val = arr1[*index]; int val2 = arr2[val]; doMoreThings(val); } With optimizations enabled (/O2) the first line where the first pointer is decremented is not executed. I assume the compiler believes that the arr1 array is not used since it thinks it can remove the decrement. Am I violating some convention in the above code? What could cause this behavior? It is a very old piece of f2c-translated code, the pointer decrement is due to the 1-based indexing of the original code.

    Read the article

  • Creating a Non-Databound Report in Winforms

    - by Jon
    I am using Visual Studio 2008 and all the components that come with it as well as Infragisitics for Winforms. I need to design a label that will print to a label printer. None of the controls are databound and will most likely be set in code eg/Label.Text = "My Heading"; as there will be minimal information on the label. One piece of information is a barcode so I need the functionality to do that, I assume I can just set the font of the label to barcode and it will do its thing. Can I just add a Crystal Report to a form design it, set the label text properties in code, tell it what printer to print to and then call report.Print(); I've had a quick go and seems not as easy as I thought. Thanks

    Read the article

  • Including non-Python files with setup.py

    - by cool-RR
    How do I make setup.py include a file that isn't part of the code? (Specifically, it's a license file, but it could be any other thing.) I want to be able to control the location of the file. In the original source folder, the file is in the root of the package. (i.e. on the same level as the topmost __init__.py.) I want it to stay exactly there when the package is installed, regardless of operating system. How do I do that?

    Read the article

  • Help me understand making maven project w/ non-maven jar dependencies usable by others

    - by deet
    Hi, I'm in the process of learning maven (and java packaging & distribution) with a new oss project I'm making as practice. Here's my situation, all java of course: My main project is ProjectA, maven-based in a github repository. I have also created one utility project, maven-based, in github: ProjectB. ProjectA depends on a project I have heavily modified that originally was from a google-code ant-based repository, ProjectC. So, how do I set up the build for ProjectA such that someone can download ProjectA.jar and use it without needing to install jars for ProjectB and ProjectC, and also how do I set up the build such that someone could check out ProjectA and run only 'mvn package' for a full compile? (Additionally, what should I do with my modified version of ProjectC? include the class files directly into ProjectA, or fork the project into something that could then be used by as a maven dependency?) I've been reading around, links such as this SO question and this SO question, but I'm unclear how those relate to my particular circumstance. So, any help would be appreciated. Thanks!

    Read the article

  • Identify a non-computer network device?

    - by Avilan
    I'm current working on a program that scans my network and discoveres computers and devices on the network. I use various operations to find data on the devices I discover, but want to distinguish the network devices from computers. And I'm wondering if anyone knows how I could do this? I looked a bit at SNMP, and tried connecting to my network printer, router and modem. But I seem to only be able to connect to the printer, neither the router or modem responds. Is there another way to identify what kind of a device an IP address belongs to?

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >