Daily Archives

Articles indexed Tuesday September 18 2012

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

  • Explicit resource loading in Ogre (Mogre)

    - by sebf
    I am just starting to learn Mogre and what I would like to do is to be able to load resources 'explicitly' (i.e. I just provide an absolute path instead of using a resource group tied to a directory). This is very different to manually loading resources, which I believe in Ogre has a very specific meaning, to build up the object using Ogres methods. I want to use Ogres resource management system/resource loading code, but to have finer control over which files are loaded and in what groups they are. I remember reading how to do this but cannot find the page again; I think its possible to do something like: Declare a resource group Declare the resource(s) (this is when the actual resource file name is provided) Initialise the resource group to actually load the resource(s) Is this the correct procedure? If so, is there any example code showing how to do this?

    Read the article

  • CursorLoader, get URI for local database

    - by user1681358
    I'm a newbie android programmer and I recently followed a tutorial which shows how to create a local SQLite database by using SQLiteDatabase.rawQuery to return a Cursor. I would like to modify my app to use CursorLoader which is apparently a better way to access the database. My problem is the CursorLoader constructor expects a URI to be given. Do I just input "file:///[path to db]"? Seems a bit messy.

    Read the article

  • How to override the default init.tcl

    - by Sean Murphy
    I'm working on a project where I want to make use of TCL as the command interpreter. I have a working c library object which I can load from within the tcl shell but my problem is finding a way to automatically do this while starting a tclsh. Essentially my ultimate goal is to be able to run a script and have it load my library and run some initial startup tcl code before dropping me back to the tclsh command prompt in interactive mode. e.g. tclsh -f myscript.tcl --then-switch-to-interactive or EXPORT TCLINIT=myscript.tcl tclsh The basic goal is to avoid having to distribute tclsh but rather rely in local user installations of tcl. All I would like to distribute is my library, a startup script and a shell command to launch the tclsh with the library preloaded. I've tried using the environment variables TCLINIT and TCL_LIBRARY but they seem to have no effect. The only workable solutions I've found so far are to add "source myscript.tcl" to either the end of /usr/share/tcltk/tcl8.5.init.tcl or ~/.tclshrc However both of these "solutions" are non perfect as they require modification of the default users workspace. It strikes me that there must be a way to handle this in TCL, but my research so far hasn't yielded anything. Does anyone have any suggestions?

    Read the article

  • How do I execute a sql statement through a variable (dyname sql) that tries to do an insert into a variable table?

    - by Testifier
    If I do what I wanna do with a TEMPORARY TABLE, it works fine: DECLARE @CTRFR VARCHAR(MAX) SET @CTRFR = 'select blah blah blah' -- <-- very long select statement. this returns a 0 or some greater number. Please note! --> I NEED THIS NUMBER. IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo][#CTRFRResult]') AND type IN ( N'U' ) ) DROP TABLE [dbo].[#CTRFRResult] CREATE TABLE #CTRFRResult ( CTRFRResult VARCHAR(MAX) ) SET @CTRFR = 'insert into #CTRFRResult ' + @CTRFR EXEC(@CTRFR) The above works fine. The problem is that several databases are using the same TEMP table. Therefore I need to use a VARIABLE table (instead of a temporary table). What I have below is not working because it says that the table must be declared. DECLARE @CTRFRResult TABLE ( CTRFRResult VARCHAR(MAX) ) SET @CTRFR = 'insert into @CTRFRResult ' + @CTRFR -- I think the issue is here. EXEC(@CTRFR) Setting @CTRFR to 'insert into...' is not working because I'm assuming the table name is out of scope. How would I go about mimicking the temporary table code using a variable table?

    Read the article

  • Fetching real time data from excel

    - by Umesh Sharma
    I am seriouly looking for your valuable help first time here. If possible, plese help me. I am developing a VB.NET app in which i read "real time data" from a excel sheet using "Microsoft.Office.Interop.Excel" i.e. excel automation. All cells in excel sheet are fetching stock data from some LOCAL DDE Server like "=XYZ|Bid!GOLD", "=XYZ|Bid!SILVER", "=XYZ|Ask!SILVER" and so on... Some cells also having fixed values like "Symbol", "Bid Rate", "32.90" etc. Values of DDE mapped cells (i.e. =XYZ|xxxx!yyy) are continuously changing. THE PROBLEM is here..."FIXED values" from excel cells are coming quite ok to my app but all DDE mapped cells values are coming "-2146826246" (When datasource local dde server ON) or "-2146826265" (OFF). Although, if i use C#.NET, it's all ok but not with Vb.NET. I want to display range of excel (A1 to J50) into VB.NET ListView which are changing in every 200ms (5 times in every 1 second) ================ Important ====================================================== Is it possible to BIND "listview items/columns values" with "excel cells" or some local memory variables ?? Currently, i am reading excel "cell by cell" and trying to put values in .NET listview but CPU USES are very high as well as it's toooo slow process. If yes, then how please ? I am a VFP developer but new to .NET It's very easy in VFP then why not in .NET ?? Please guide me, if someone has the solution...

    Read the article

  • managing library dependencies with Boost.Build and C++

    - by user931794
    I want to develop a project which can be built on a bunch of different platforms. The project code will be in C++, what's the the best way to manage libraries? I plan on using bjam as the build system because I'm going to be depending on Boost and their unit testing framework as well. The two dependent libraries are Boost itself and FLTK. The possibilities that come to mind for library management are: include build artifacts (binaries) and headers for all supported platforms in-tree include complete source for all dependent libraries in-tree, and somehow script them as dependencies A combination of 1 and 2, like node.js does with v8 inform the user that they need to build the libraries themselves and then have them on the PATH or in some special directory, like libcurl does with its dependencies What is the best approach here? The project will probably not grow beyond a few thousand lines over the next six months, but I want to make the right choice here so that I don't have to come back and switch everything around later.

    Read the article

  • How to float span properly

    - by brianr1
    I am developing this site http://indigonightlife.com/ The second section down is This Weeks Events. To the right of that heading is an image of the 5 little blue lines. The problem Im having is I cant get it to float to the right side of the container. As it is now, its in the middle of the container. Ive tried all kinds of combos of floats, clearfixes, and such but I cant get it to stay to the right. The section below titled Resident and Guest DJs has the same image but its floated fine. Not sure what the difference is. Any help would be appreciated. Thanks.

    Read the article

  • Scalable images in Java

    - by CodeGuy
    I anticipate using some images in my Java application. These images will be drawn onto my JPanel using g.drawImage(). The JPanel is resizable and the images should scale as the JPanel increases/decreases in size Two questions: What image format is best for this type of desired scalable image? For instance, in this application, an image of size 100x100 may be scaled into an image of size 30x30 or 10x10 or 300x300. How can I write code to do this scaling?

    Read the article

  • Accessing property of object vs variable in javascript

    - by Samuel
    Why when I try to access a variable that don't exist, javascript throw an exception but when I try to access a property that don't exist in an object, javascript returns an undefined object? For example, this case returns an undefined object: function Foo(){ console.log(this.bar); } Foo(); But, in this other example, javascript throw an exception: function Foo(){ console.log(bar); } Foo(); ReferenceError: bar is not defined

    Read the article

  • I am not able to kill a child process using TerminateProcess

    - by user1681210
    I have a problem to kill a child process using TerminateProcess. I call to this function and the process still there (in the Task Manager) This piece of code is called many times launching the same program.exe many times and these process are there in the task manager which i think is not good. sorry, I am quiet new in c++ I will really appreciate any help. thanks a lot!! the code is the following: STARTUPINFO childProcStartupInfo; memset( &childProcStartupInfo, 0, sizeof(childProcStartupInfo)); childProcStartupInfo.cb = sizeof(childProcStartupInfo); childProcStartupInfo.hStdInput = hFromParent; // stdin childProcStartupInfo.hStdOutput = hToParent; // stdout childProcStartupInfo.hStdError = hToParentDup; // stderr childProcStartupInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; childProcStartupInfo.wShowWindow = SW_HIDE; PROCESS_INFORMATION childProcInfo; /* for CreateProcess call */ bOk = CreateProcess( NULL, // filename pCmdLine, // full command line for child NULL, // process security descriptor */ NULL, // thread security descriptor */ TRUE, // inherit handles? Also use if STARTF_USESTDHANDLES */ 0, // creation flags */ NULL, // inherited environment address */ NULL, // startup dir; NULL = start in current */ &childProcStartupInfo, // pointer to startup info (input) */ &childProcInfo); // pointer to process info (output) */ CloseHandle( hFromParent ); CloseHandle( hToParent ); CloseHandle( hToParentDup ); CloseHandle( childProcInfo.hThread); CloseHandle( childProcInfo.hProcess); TerminateProcess( childProcInfo.hProcess ,0); //this is not working, the process thanks

    Read the article

  • Java reflection field value in extends class

    - by Lukasz Wozniczka
    Hello i hava got problem with init value with java reflection. i have got simple class public class A extends B { private String name; } public class B { private String superName; } and also i have got simple function: public void createRandom(Class<T> clazz , List<String> classFields){ try { T object = clazz.newInstance(); for(String s : classFields){ clazz.getDeclaredField(s); } } catch(Exception e){ } } My function do other stuff but i have got problem because i have got error : java.lang.NoSuchFieldException: superName How can i set all class field also field from super Class using reflection ??

    Read the article

  • Android - Add other values to websettings settextsize

    - by user1681477
    In my application I am using a webview, and in order to increase/decrease text size, I am using WebSettings().setTextSize method, but, this method is limited to 5 predefined enum sizes only (SMALLEST, SMALLER, NORMAL, LARGER,LARGEST). I know I can use WebSettings().setTextZoom(int), but my application is available for API Level 8 and above, and this method was introduced in API Level 14... My question is: Is there any way to add other sizes to webSettings().setTextSize? maybe by extending textSize enum, or define other sizes?

    Read the article

  • Jagged Edge Arrays in PHP

    - by chriscct7
    I want to store some data in (I guess a semi-2, semi-3d array) in PHP (5.3) What I need to do is store data about each floor like this: Floor Num of Spots Handicap Motorcyle Other 1 100 array(15,16,17) array (47,62) array (99,100) 2 100 array(15,16,17) array (47,62) array (99,100) and on The problem is, is if the Handicap+Motorcyle+Other were ints, I could just store the data in a 2d array. However, they aren't. So I was thinking I could make something almost like a 3D array, with the first two columns only being in 2D. The other thought I had was making a 2D array and for columns 3,4, and 5 instead of saving as array(15,16) //save like 1516 And then split at two digits (1 digit array numbers would be prefaced with a 0). However, I am wondering about the limit of the length of a string, because if I decide to move to a 3 digit length number in the array, like array(100, 104), and I need to store alot of numbers, I am thinking I am going to quickly exceed the max.

    Read the article

  • Tuple conversion to a string

    - by David542
    I have the following list: [('Steve Buscemi', 'Mr. Pink'), ('Chris Penn', 'Nice Guy Eddie'), ...] I need to convert it to a string in the following format: "(Steve Buscemi, Mr. Pink), (Chris Penn, Nice Guy Eddit), ..." I tried doing str = ', '.join(item for item in items) but run into the following error: TypeError: sequence item 0: expected string, tuple found How would I do the above formatting?

    Read the article

  • How do I get accurev to find a moved workspace?

    - by eric f
    I created a workspace in AccuRev under M:\EclipseWorkspaces\. The project checked out fine. Then I moved the project to C:\EclipseWorkspaces\. Now AccuRev thinks the project does not exists. This is probably because AccuRev is looking for the project on my M drive. How do I get AccuRev to find my project? I am using version 5.3. This computer is slow so I'd like to do this using the CLI. Update: I deleted the workspace in the AccuRev client.... Can I add the workspace on my C drive into my stream in AccuRev?

    Read the article

  • XP Leveling System - PHP

    - by Michael Rich
    Rank Table ID, Primary Key RANK, The rank or level, 1 being the highest and 3 the lowest MIN_SCORE, The minimum amount of point or XP needed to reach the rank NAME, The associated name of the rank Rank Table +----+------+-----------+-------------------------+ | ID | RANK | MIN_SCORE | NAME | +----+------+-----------+-------------------------+ | 1 | 1 | 18932 | Editor-in-Chief | | 2 | 2 | 15146 | Senior Technical Writer | | 3 | 3 | 12116 | Senior Copywriter | +----+------+-----------+-------------------------+ Ranking Table ID, Primary Key FK_MEMEBER_ID, Foreign Key to member's Primary Key FK_RANK, Foreign Key to Author Rank Table's Rank column (top) SCORE, The member's current earned score or XP Ranking Table +-----+--------------+---------+-------+ | ID | FK_MEMBER_ID | FK_RANK | SCORE | +-----+--------------+---------+-------+ | 1 | 1 | 1 | 17722 | | 2 | 2 | 2 | 16257 | | 3 | 3 | 3 | 12234 | +-----+--------------+---------+-------+ In my class I have stored the ranks -- matching those in the Rank Table -- and correlating minimum scores; RANK as key and MINIMUM_SCORE as value. When a member's score (XP) is updated (up/down) I want to test that updated score against the below array to determine if their rank needs updating too. private $scores = array('3' => '12116', '2' => '15146', '1' => '18932',); Using the updated score, how could I determine the correlating rank from the above array? Everything is open to scrutiny, this is my first time creating a ranking system so I hope to get it right :)

    Read the article

  • visusal studio embedded crystal report keeps prompting database login?

    - by phill
    I'm using visual studio 2005 to develop a form with a combobox passing a value into the parameter of an embedded crystal report. I'm trying to figure out why it keeps prompting me for a database login every single time you try to run the report with a different combobox selection. Here is my code: private Sub Form1_load... Dim ConnName As String Dim ServerName As String Dim DBName As String Dim user As String Dim pass As String Dim gDBA As ADODB.Connection Dim records As ADODB.Recordset Dim datver As ADODB.Recordset Dim query As String '---OPEN THE DATABASE CONNECTIONS gDBA = New ADODB.Connection ': gDBA.CursorLocation = adUseServer 'Added to prevent time out error gDBA.CommandTimeout = 1000 : gDBA.ConnectionTimeout = 1000 gDBA.ConnectionString = "Server=svr13;Database=subscribers;User ID=KViews;Password=Solution;Trusted_Connection=True;" gDBA.Open("Data Source=Kaseya;Initial Catalog=subscribers;User Id=KViews;Password=Solution;", "KViews", "Solution") records = New ADODB.Recordset query = "select distinct groupname from _v_k order by groupname desc" 'records.ActiveConnection = gDBA.ConnectionString records.CursorType = CursorTypeEnum.adOpenForwardOnly records.LockType = LockTypeEnum.adLockReadOnly records.Open(query, gDBA) Do While Not records.EOF ComboBox1.Items.Add(records.Fields("groupname").Value) records.MoveNext() Loop end Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim selected As String selected = ComboBox1.Text Dim cryRpt As New ReportDocument cryRpt.Load("C:\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\CrystalReport1.rpt") cryRpt.SetDatabaseLogon("KViews", "Solutions", "svr13", "subscribers") cryRpt.SetParameterValue("companyname", selected) CrystalReportViewer1.ReportSource = cryRpt CrystalReportViewer1.Refresh() End Sub I looked at this previous posting http://stackoverflow.com/questions/1132314/database-login-prompt-with-crystal-reports but this wasn't very helpful. I couldn't find where a CMC was to disable the prompt. Any ideas? thanks in advance

    Read the article

  • photo upload with codeigniter

    I know there are many tutorials online, but I could not make them work :( maybe something particularly wrong with my system :/ My Controller localpath is: /localhost/rl/applications/backend/controller/ Controller: function do_upload() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $this->load->library('upload', $config); if ( ! $this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); $this->load->view('add_image', $error); } else { $data = array('upload_data' => $this->upload->data()); $data['id'] = $this->input->post['id_work']; $this->load->view('add_image', $data); } } My View localpath is: /localhost/rl/applications/backend/view/ View: echo form_open_multipart('do_upload'); <ul class="frm"> <li><label>File: *</label><input type="file" name="userfile" class="frmlmnt" size="50" /></li> <li><label></label><input type="submit" class="btn" value="Upload" /></li> </ul> </form> Maybe I do something wrong with path

    Read the article

  • Read from file in eclipse

    - by Buzkie
    I'm trying to read from a text file to input data to my java program. However, eclipse continuosly gives me a Source not found error no matter where I put the file. I've made an additional sources folder in the project directory, the file in question is in both it and the bin file for the project and it still can't find it. I even put a copy of it on my desktop and tried pointing eclipse there when it asked me to browse for the source lookup path. No matter what I do it can't find the file. here's my code in case it's pertinent: System.out.println(System.getProperty("user.dir")); File file = new File("file.txt"); Scanner scanner = new Scanner(file); in addition, it says the user directory is the project directory and there is a copy there too. I have no clue what to do. Thanks, Alex after attempting the suggestion below and refreshing again, I was greeted by a host of errors. FileNotFoundException(Throwable).<init>(String) line: 195 FileNotFoundException(Exception).<init>(String) line: not available FileNotFoundException(IOException).<init>(String) line: not available FileNotFoundException.<init>(String) line: not available URLClassPath$JarLoader.getJarFile(URL) line: not available URLClassPath$JarLoader.access$600(URLClassPath$JarLoader, URL) line: not available URLClassPath$JarLoader$1.run() line: not available AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method] URLClassPath$JarLoader.ensureOpen() line: not available URLClassPath$JarLoader.<init>(URL, URLStreamHandler, HashMap) line: not available URLClassPath$3.run() line: not available AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method] URLClassPath.getLoader(URL) line: not available URLClassPath.getLoader(int) line: not available URLClassPath.access$000(URLClassPath, int) line: not available URLClassPath$2.next() line: not available URLClassPath$2.hasMoreElements() line: not available ClassLoader$2.hasMoreElements() line: not available CompoundEnumeration<E>.next() line: not available CompoundEnumeration<E>.hasMoreElements() line: not available ServiceLoader$LazyIterator.hasNext() line: not available ServiceLoader$1.hasNext() line: not available LocaleServiceProviderPool$1.run() line: not available AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method] LocaleServiceProviderPool.<init>(Class<LocaleServiceProvider>) line: not available LocaleServiceProviderPool.getPool(Class<LocaleServiceProvider>) line: not available NumberFormat.getInstance(Locale, int) line: not available NumberFormat.getNumberInstance(Locale) line: not available Scanner.useLocale(Locale) line: not available Scanner.<init>(Readable, Pattern) line: not available Scanner.<init>(ReadableByteChannel) line: not available Scanner.<init>(File) line: not available code used: System.out.println(System.getProperty("user.dir")); File file = new File(System.getProperty("user.dir") + "/file.txt"); Scanner scanner = new Scanner(file);

    Read the article

  • Databinding a ListView with Mono for Android

    - by Wallym
    The world lives on data. Data is all around us and in many forms: salespeople need to know what customers have spent; twitter users want to know what their friends are saying. How do we as developers present data to a user? In Android, we use the ListView in its various forms. In this article, we'll look at using a ListView, how we can work with it, then discuss what we need to do to overcome some of the challenges in a mobile environment.Article url: http://visualstudiomagazine.com/articles/2012/09/14/databind-a-listview.aspx

    Read the article

  • Possible to use DRBD on two ESXi virtualized servers?

    - by chen
    I have two servers (attached disks have been set up as hardware RAID1 for disk device level failure resilience). Here is the setup in my mind: 1) Install ESXi on each of the physical server, M1, M2; 2) Start one VM on each of the ESXi virtualized physical server V1, V2; 3) Install the DRDB drivers within V1 and V2. Essentially, this is a "virtualizing machine running DRBD in the VM's instead of bare metal hardware" idea. My question is whether the above setup can achieve the same "networked RAID1" goal that DRDB can achieve in the bare-metal physical machines (http://www.drbd.org/). Thanks. [EDIT] I found this (http://serverfault.com/questions/49305/drbd-experimentation-and-virtualization) is a similar question, but the answer does not seem to be firmative enough for me to follow.

    Read the article

  • what are the vulnerabilities installing openvpn client on a customer's unattended server?

    - by senorsmile
    We run Pfsense as our primary firewall. We also have OpenVPN server running on that box to allow us to remotely connect to our network. My question is: if we have a customer's mostly unattended server that we want to access remotely, what security vulnerabilities are there to installing openvpn on the customer's server as a client connecting to our network. Presumably, we would want to limit/restrict that server's access to the rest of our network. How do we lock openvpn down and are there ways to detect abnormal activity coming from an openvpn client?

    Read the article

  • Hardware for Capturing Packets

    - by Kevin
    One of my clients is a small school district in Texas. Like any school, they often have problems with network'd peripherals such as printers, et al. It would be nice to be able to simply "listen" to what the printer and PC are saying to each other (or not saying more importantly)... The problem is that I can't find old-style "hubs" anymore, and even if I could, it's not a long-term solution. All of the devices that I have found to replicate the purpose of a simple hub are either $100+ or are difficult to throw into a networking tool kit (aka my backpack)... Now that hubs are dead, what's the new low-cost standard for simple packet capture in the networking world?

    Read the article

  • LAMP Server without single failure point + Global Server Load Balancing?

    - by José Nobile
    I want implement a LAMP Server (Linux Apache MySQL PHP) without a single failure point and with Global Server Load Balancing. I have a server in Cali, Colombia, and other server will be installed in Melbourne, Australia, user in America can use the Cali Server and in Europe, Asia, Africa or Oceania use the Melbourne Server. If any server fail (or load is excessively high), a server must answer all request. Data in MYSQL must be in sync, php files, any configuration in both server must be in sync. I read about of Google DNS Server 8.8.8.8 and 8.8.4.4 and ANY Cast, also about MySQL semisynchronous replication and MySQL Cluster, but what about other things, as crontabs, and the configurations in server? The solution can't depend of APNIC or BGP, only open source software running in Linux.

    Read the article

  • server 2008 r2 - wbadmin systemstatebackup - system writer not found in the backup

    - by TWood
    I am trying to manually run a systemstatebackup command on my server 2008 r2 box and I am getting an error code '2155347997' when I view the backup event log details. The command line tells me that I have log files written to the c:\windows\logs\windowsserverbackup\ path but I have no files of the .log type there. My command window tells me "System Writer is not found in the backup". However when I run vssadmin list writers I find System Writer in the list and it shows normal status with no last errors stored. I am running this from an elevated command prompt as well as from a logged on administrator account. My backup target path has permission for network service to have full control and it has plenty of free space. Looking in eventlog I have two VSS error 8194 that happen immediately before the Backup error 517 which has the errorcode 2155347997 listed. All three of these errors are a result of trying to run the command for the systemstatebackup. It's my belief that some VSS related permission is failing and exiting the backup process before it ever gets started. Because of this the initial code that creates the log files must not be running and this is why I have no files. When running the systemstatebackup command from the command prompt and watching the windowsserverbackup directory I do see that I have a Wbadmin.0.etl file which gets created but it is deleted when the backup errors out and stops. I have looked online and there are numerous opinions as to the cause of this error. These are the things I have corrected to try and fix this issue before posting here: Machine runs a HP 1410i smart array controller but at one time also used a LSI scsi card. Used networkadminkb.com's kb# a467 to find one LSI_SCSI entry in HKLMSysCurrentControlSetServices which start was set to 0x0 and I modified to 0x3. No changes. In HKLMSystemCurrentControlSetServicesVSSDiag I gave network service full control where it previously only had "Special Permission". No changes. I followed KB2009272 to manually try to fix system writer. These are all of the things I have tried. What else should I look at to resolve this issue? It may be important to note that I run Mozy Pro on this server and that was known in the past to use VSS for copying operations and it occasionally threw an error. However since an update last year those error event log entries have stopped.

    Read the article

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