Search Results

Search found 7209 results on 289 pages for 'names'.

Page 23/289 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Producing dynamically generated range names in Excel using c#

    - by Matey
    What is the best way to produce several tables of unknown size on the same worksheet? Values will be pulled from an oracle database and are used as values on several tables. Is it possible to create dynamic named ranges or is some other method desirable? I have some experience with c# but do not have access to VSTO 2005. Any help or suggestions would be greatly appreciated. I am willing to explain the problem further if requested.

    Read the article

  • Adding file names to an array list in java

    - by Chris G
    Hi I am currently needing to load the contents of a folders filenames to an arraylist I have but I am unsure as how to do this. To put it into perspective I have a folder with One.txt, Two.txt, Three.txt etc. I want to be able to load this list into an arraylist so that if I was to check the arraylist its contents would be : arraylist[0] = One arraylist[1] = Two arraylist[3] = Three If anyone could give me any insight into this it would be much appreciated.

    Read the article

  • WCF + NserviceBus Names notation

    - by John
    Hi. I trying to create WCF via NserviceBus. Create contract: [ServiceContract] public interface INotifyBusService { [OperationContract(Action = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/ProcessResponse")] ResultType Notify(RequestMessage request); } The problem: When i create a clinet it can't handle this service because expected node with name "Process" in "http://tempuri.org/" namespace. if I do like that [OperationContract(Name = "Process", Action = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/ProcessResponse")] ResultType Notify(RequestMessage request); Everything works fine. Name = "Process" - it's a NServiceBus hardcode, like Enum return type in service method ?

    Read the article

  • Python: replace urls with title names from a string

    - by Hellnar
    Hello I would like to remove urls from a string replace them with their titles of the original contents. For example: mystring = "Ah I like this site: http://www.stackoverflow.com. Also I must say I like http://www.digg.com" sanitize(mystring) # it becomes "Ah I like this site: Stack Overflow. Also I must say I like Digg - The Latest News Headlines, Videos and Images" For replacing url to the title, I have written this snipplet: #get_title: string -> string def get_title(url): """Returns the title of the input URL""" output = BeautifulSoup.BeautifulSoup(urllib.urlopen(url)) return output.title.string

    Read the article

  • Dynamic Variable Names in Included Module in Ruby?

    - by viatropos
    I'm hoping to implement something like all of the great plugins out there for ruby, so that you can do this: acts_as_commentable has_attached_file :avatar But I have one constraint: That helper method can only include a module; it can't define any variables or methods. Here's what the structure looks like, and I'm wondering if you know the missing piece in the puzzle: # 1 - The workhorse, encapsuling all dynamic variables module My::Module def self.included(base) base.extend ClassMethods base.class_eval do include InstanceMethods end end module InstanceMethods self.instance_eval %Q? def #{options[:my_method]} "world!" end ? end module ClassMethods end end # 2 - all this does is define that helper method module HelperModule def self.included(base) base.extend(ClassMethods) end module ClassMethods def dynamic_method(options = {}) include My::Module(options) end end end # 3 - send it to active_record ActiveRecord::Base.send(:include, HelperModule) # 4 - what it looks like class TestClass < ActiveRecord::Base dynamic_method :my_method => "hello" end puts TestClass.new.hello #=> "world!" That %Q? I'm not totally sure how to use, but I'm basically just wanting to somehow be able to pass the options hash from that helper method into the workhorse module. Is that possible? That way, the workhorse module could define all sorts of functionality, but I could name the variables whatever I wanted at runtime.

    Read the article

  • Proper color names from colordialog

    - by Mike
    Whenever I run this, and open the color dialog, there are many colors that do not having a proper name, the listbox will show something like "ffff8000"(Orange-Yellow). Is there another way of pushing the proper name? Is there a proper Color Name library I can reference in code? colorDialog1.ShowDialog(); cl.Add(colorDialog1.Color.Name); listBox1.Items.AddRange(cl.ToArray());

    Read the article

  • Package names - impl v internal

    - by Ben J
    In my time of digging around Java APIs I have come across both impl and internal packages. Up until now I never really thought about the difference - as with all enterprisey Java apps, I figured they just meant that "actual implementation in here; you (API user) should be really using the interface. Go away." A little bit of digging around Stack Overflow seems to suggest that the internal package at least can have some security placed around it. So, what is the difference? I don't think it is a matter of taste because I have seen APIs with both.

    Read the article

  • Python script names in tasklist

    - by Richard
    I am wondering, is there a way to change the name of a script so that it is not called "python.exe" in the tasklist. The reason I am asking is that I am trying to make a batch file that run's a python script. I want the batch file to check to see if the script is already running. if the script is already running then the batch file will do nothing. Thanks

    Read the article

  • Psycopg2 doesn't like table names that start with a lower case letter

    - by Count Boxer
    I am running ActiveState's ActivePython 2.6.5.12 and PostgreSQL 9.0 Beta 1 under Windows XP. If I create a table with an upper case first letter (i.e. Books), psycopg2 returns the "Programming Error: relation "books" does not exist" error message when I run the select statement: execute("SELECT * FROM Books"). The same error is returned if I run: execute("SELECT * FROM books"). However, if I change the table to a lower case first name (i.e. books), then either of the above statements works. Are tables name supposed to have a lower case first name? Is this a setting or a feature or a bug? Am I missing something obvious?

    Read the article

  • JList with JScrollPane and prototype cell value wraps element names (replaces with dots instead of s

    - by Tom
    I've got a Jlist inside a JScrollPane and I've set a prototype value so that it doesn't have to calculate the width for big lists, but just uses this default width. Now, the problem is that the Jlist is for some reason replacing the end of an element with dots (...) so that a horizontal scrollbar will never be shown. How do I disable with "wrapping"? So that long elements are not being replaced with dots if they are wider than the Jlist's width? I've reproduced the issue in a small example application. Please run it if you don't understand what I mean: import javax.swing.*; import java.awt.*; public class Test { //window private static final int windowWidth = 450; private static final int windowHeight = 500; //components private JFrame frame; private JList classesList; private DefaultListModel classesListModel; public Test() { load(); } private void load() { //create window frame = new JFrame("Test"); frame.setSize(windowWidth, windowHeight); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setUndecorated(true); frame.getRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG); //classes list classesListModel = new DefaultListModel(); classesList = new JList(classesListModel); classesList.setPrototypeCellValue("prototype value"); classesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); classesList.setVisibleRowCount(20); JScrollPane scrollClasses = new JScrollPane(classesList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); for (int i = 0; i < 200; i++) { classesListModel.addElement("this is a long string, does not fit in width"); } //panel JPanel drawingArea = new JPanel(); drawingArea.setBackground(Color.white); drawingArea.add(scrollClasses); frame.add(drawingArea); //set visible frame.setVisible(true); } } Even if you force horizontal scrollbar, you still won't be able to scroll because the element is actually not wider than the width because of the dot (...) wrapping. Thanks in advance.

    Read the article

  • Linux file names & file globbing

    - by John Lelos
    I have a list of files named: file000 file001 file002 file003 ... file1100 How can I match all files that have a number greater than 800 but less than 1000 ? I am using linux bash Thank you Edit Actually, my files are named like: ab869.enc cp936.enc g122345.enc x2022.enc abc8859-14.enc aax5601.enc cp936-1.enc so the first solution dont match the correct files :( How can I match files that have number between 800-999 ?

    Read the article

  • How to write different implicit rules for different file names for GNU Make

    - by anupamsr
    Hi! I have a directory in which I keep adding different C++ source files, and generic Makefile to compile them. This is the content of the Makefile: .PHONY: all clean CXXFLAGS = -pipe -Wall -Wextra -Weffc++ -pedantic -ggdb SRCS = $(wildcard *.cxx) OBJS = $(patsubst %.cxx,%.out,$(SRCS)) all: $(OBJS) clean: rm -fv $(OBJS) %.out: %.cxx $(CXX) $(CXXFLAGS) $^ -o $@ NOTE: As is obvious from above, I am using *.out for executable file extensions (and not for object file). Also, there are some files which are compiled together: g++ file_main.cxx file.cxx -o file_main.out To compile such files, until now I have been adding explicit rules in the Makefile: file_main.out: file_main.cxx file.cxx file.out: file_main.out @echo "Skipping $@" But now my Makefile has a lot of explicit rules, and I would like to replace them with a simpler implicit rule. Any idea how to do it?

    Read the article

  • REST Rails 2 nested routes without resource names?

    - by mrbrdo
    I'm using Rails 2. I have resources nested like this: - university_categories - universities - studies - professors - comments I wish to use RESTful routes, but I don't want all that clutter in my URL. For example instead of: /universities/:university_id/studies/:study_id/professors/:professor_id I want: /professors/:university_id/:study_id/:professor_id (I don't map professors seperately so there shouldn't be a confusion between this and /professors/:professor_id since that route shouldn't exist). Again, I want to use RESTful resources/routes... Also note, I am using slugs instead of IDs. Slugs for studies are NOT unique, while other are. Also, there are no many-to-many relationships (so if I know the slug of a professor, which is unique, I also know which study and university and category it belongs to, however I still wish this information to be in the URI if possible for SEO, and also it is necessary when adding a new professor). I do however want to use shallow nesting for "administrator" URIs like edit, destroy (note the problem here with Study since it's slug is not unique, though)... I would also like some tips on how to use the url helpers so that I don't have too much to fix if I change the routes in the future... Thank you.

    Read the article

  • Dynamic where clause in LINQ - with column names available at runtime

    - by sandesh247
    Disclaimer: I've solved the problem using Expressions from System.Linq.Expressions, but I'm still looking for a better/easier way. Consider the following situation : var query = from c in db.Customers where (c.ContactFirstName.Contains("BlackListed") || c.ContactLastName.Contains("BlackListed") || c.Address.Contains("BlackListed")) select c; The columns/attributes that need to be checked against the blacklisted term are only available to me at runtime. How do I generate this dynamic where clause? An additional complication is that the Queryable collection (db.Customers above) is typed to a Queryable of the base class of 'Customer' (say 'Person'), and therefore writing c.Address as above is not an option.

    Read the article

  • Get application names with specific permission

    - by rolling.stones
    I want list of all applications installed on the device which use a specific permission like INTERNET. i am using this code , but not able to retrieve results , please help . private ArrayList<String> getInstalledApps(Context context) { ArrayList<String> results = new ArrayList<String>(); PackageManager packageManager = context.getPackageManager(); List<PackageInfo> applist = packageManager.getInstalledPackages(0); Iterator<PackageInfo> it = applist.iterator(); while (it.hasNext()) { PackageInfo pk = (PackageInfo) it.next(); if (PackageManager.PERMISSION_GRANTED == packageManager.checkPermission(Manifest.permission.INTERNET, pk.packageName)) results.add("" + pk.applicationInfo.loadLabel(packageManager)); } for (int i = 0; i <= results.size(); i++) { Log.v("app using internet = ", results.toString()); } return results; } Thanks in advance. Any help accepted :)

    Read the article

  • codeigniter differentiate field names in JOINed tables

    - by Patrick
    Hi, I need to retrieve data from two tables. the first is a list of events, the second is a list of venues. I have a fields with the same name in both tables: events.venue (which is an ID) and venues.venue is the name of the place, say "blues bar". The tables can be joined on events.venue = venues.id. Snippet of my model: $this->db->select('events.*, venues.*'); $this->db->join('venues', 'events.venue = venues.id'); if ($date != 'all') { $this->db->where('date', $date); } if ($keyword) { $this->db->like('description', $keyword); $this->db->or_like('band', $keyword); $this->db->or_like('venue', $keyword); $this->db->or_like('genre', $keyword); } $Q = $this->db->get('events'); if ($Q->num_rows() > 0) { foreach ($Q->result() as $row) { $data[] = $row; } } $Q->free_result(); return $data; Snippet of the View: foreach ($events as $row) { echo "<p>{$row->band} ({$row->genre})<br />"; echo "Playing at: {$row->venue}<br /></p>"; // echoes "blues bar" //more here... } 2 Questions: 1) Why does $row-venue echo venues.venue, instead of events.venue? B) how can I differentiate them? eg. What if I want to echo both events.venue and venues.venue? I can probably do something like "SELECT venues.venue as name_of_the_venue", but how can I do this when I've already selected *?

    Read the article

  • Get class constant names in php?

    - by user151841
    I have a php class with some class constants that indicate the status of an instance. When I'm using the class, after I run some methods on it, I do some checks to make sure that the status is what I expect it to be. For instance, after calling some methods, I expect the status to be MEANINGFUL_STATUS_NAME. $objInstance->method1(); $objInstance->method2(); if ( $objInstance->status !== class::MEANINGFUL_STATUS_NAME ) { throw new Exception("Status is wrong, should not be " . class::MEANINGFUL_STATUS_NAME . "."); } However, this gives me the exception message "Status is wrong, should not be 2" when what I really want to see is "Status is wrong, should not be MEANINGFUL_STATUS_NAME" So I've lost the meaningfulness of the constant name. I was thinking of making an 'translation table' array, so I can take the constant values and translate them back into their name, but this seems cumbersome. How should I translate this back, so I get an error message that gives me a better idea of what went wrong?

    Read the article

  • Different RegisterWindowMessage() names appear the same

    - by Mike Trader
    Using the C/C++ Windows API RegisterWindowMessage() I am using the name of the application as the message name. Next I call CreatMutex() using the same name so that I can tell if it already exists. If it does, I know this application is already running and not to launch a second instance of it. THis is the operation of my function Running() My confusion is over the message name. It seems that "AutoConvert.exe" and "AutoAppend.exe" are interpreted as the same name. Why?

    Read the article

  • Automatically Add a Prefix to Column Names for @Embeddable Classes

    - by VeeArr
    I am developing a project in which I am persisting some POJOs by adding Hibernate annotations. One problem I am running into is that code like this fails, as Hibernate tries to map the sub-fields within the Time_T onto the same column (i.e. startTime.sec and stopTime.sec both try to map to the colum sec, causing an error). @Entity public class ExampleClass { @Id long eventId; Time_T startTime; Time_T stopTime; } @Embeddable public class Time_T { int sec; int nsec; } As there will be many occurrences like this throughout the system, it would be nice if there was an option to automatically append a prefix to the column name (e.g. make the columns be startTime_sec, startTime_nsec, stopTime_sec, stopTime_nsec), without having to apply overrides on a per-field basis. Does Hibernate have this capability, or is there any other reasonable work-around?

    Read the article

  • mysql to xls sheet genration problemI(getting html code along with records ,unable get column names)

    - by pmms
    <?php if($_POST['Submit']=='Generatexml') { $tblname=$_GET['genratexml']; //mysql_connect("localhost","root",""); //mysql_select_db("hitnrunf_db"); global $obj_mysql; $result = mysql_query("SELECT * FROM tbl_js_login"); while($row = mysql_fetch_array($result)) { $csv_output .= "$row[fld_id],$row[fld_fname],$row[fld_lname]"; $csv_output .="\015\012"; } header("Content-type: application/vnd.ms-excel"); header("Content-disposition: csv; filename= Student_Data_". date("Y-m-d") . ".csv"); print $csv_output; exit; } include_once $path."includes/jobseeker_form.php"; ?> In the above we are getting html code along wtih id, firstname, lastname columns. we are unable to get the heading of the columns also How to remove Html code from xls file also need to get headers

    Read the article

  • Fitting place names into map shapes

    - by Old Man
    I'm drawing shapes using GDI+ using a list of lat/lon floats, and I need to place the name of the place within the borders of the polygon. Simply centering the text in the bounding rectangle doesn't work for irregular shapes. I have the text and the font so I can get the size of the rectangle that the text will need to fit in, but at that point I'm stuck. This seems like a common problem that all mapping software solves, as well as the kind of thing you would find in an algorithm or computer graphics textbook. So, given a list of floats for a polygon and a rectangle, is there a way to get the best possible point to place the text, using: 1) GDI+; 2) SQL Server Geospatial; or 3) c# code (or c, pseudocode, etc)

    Read the article

  • Rails Collection_select names

    - by Jack
    Hi, I am creating a Rails app and have added a form: <div class="field"> <%= f.label :title %><br /> <%= f.text_field :title %> </div> <div class="field"> <%= f.label :client_id %><br /> <%= collection_select(:project, :client_id, Client.all, :id, :contact_name, {:prompt => "Select a Client"}) %> </div> This currently displays the contact_name of the client. Is it possible to have it display a list of contact_names concatenated with the client_id? If so, how would I do this? Cheers

    Read the article

  • Elements of a Java Object Array are created but without correct names

    - by Greenhouse Gases
    Hi all Im having rather an annoying problem. I have a class called Person and a class called Event which serve to create objects to be used for competitors that compete in a certain event. When I add a competitor thats fine and the GUI list updates accordingly, however when I add an event the element in the array does not take on the value of the instance variable name in the class Event and so the GUI does not show the event name, though it is being added in the array correctly. How can I make it so that the event object in each element of the listOfEvents array (which is an array of event objects) has the name of the event. I should add this is for university though this isnt the part for which we will be assessed, it is somethign i have come across and due to not being able to see the code for the GUI, I've hit the proverbial brick wall. I wont include the whole load of code Ive been writing but hopefully my description and snippets below will suffice. Any advice I would appreciate greatly. No doubt I have overlooked something simple! Many thanks. listOfEvents is declared as: Event[] listOfEvents = new Event[20]; A snippet from the Event class: public class Event { String name; Person[] participants = new Person[10]; // array of competitors for the event public Event(String name) { this.name = name; } } and its use in the addEvent method (p is a global variable): public void addEvent(String eventName) { listOfEvents[p] = new Event(eventName); p++; }

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >