Search Results

Search found 406 results on 17 pages for 'vincent davis'.

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

  • using html text in as3

    - by vincent
    Hello, i'm having a bit of a question, I have some newspost from my database. But there are tags in it and some tags aswell. My questiion is how i should go about it to get the newspost showing as it should be. The images should get shown instead of the tags etc. I know i'll have to work with a loader to use the images but how would as3 recognize them? Is there anyway i could use htmltext or something so as3 knows automaticly where the imagetags are? Also, if i add the image would it be possible to wrap the text around it? So i dont have an empty space next to the image?

    Read the article

  • How to count how many items for distinct items in mysql?

    - by Vincent Duprez
    Imagine a have a table with a column named status: status ------ A A A B C C D D D How can I count how many rows have A, how many rows have B etc? this kind of output: A |B |C |D |E ------------------ 3 |1 |2 |3 |0 As for E = O , this will always be A,B,C,D and E Output should be one row (thus 1 query). When doing a distinct count (most returning answer on my searches, it does return how many different elements there are, 4 in this case...)

    Read the article

  • Flex: -frames.frame

    - by Michael Brewer-Davis
    Has anyone used this successfully or found further documentation than just the below (from the Adobe site): frames.frame label class_name [...] Specifies a SWF file frame label with a sequence of class names that are linked onto the frame. This option lets you add asset factories that stream in after the application that then publish their interfaces with the ModuleManager class. The advantage to doing this is that the application starts faster than it would have if the assets had been included in the code, but does not require moving the assets to an external SWF file. This is an advanced option.

    Read the article

  • creating object according to the switch case value

    - by vincent
    hello, i have the following switch case: switch (appModel.currentPage){ case "Programma": case "Winkelwagen": case "Films": case "Contact": if (page){ removeChild(page); } //here i would like to create a new object page that has the type of the switch. i mean this: var page: getDefinitionByName(appModel.currentPage+"Page"); this doesnt work thou but it should be something like: "FilmsPage or ContactPage or ...". addChild(page); break; Does anyone know how to do this?

    Read the article

  • Reading PDF form field data from Flex 4 ( via php or coldfusion )

    - by Brian Russel Davis
    Been searching web for an answer for this for a MONTH. I am not an expert in Coldfusion. So supposedly this is easy in CF -- but the mark-up confuses the HECK out of me. So here I am. I have managed to import and read a PDF using the CF Proxy for Actionscript: http://forums.adobe.com/thread/754629?tstart=0 --- BUT --- After all my trouble there, the precious form filed information that I was looking for was not there in the PDF info object. GRRRR. So I am back to looking for a way to do this with CFC's or CFM's or PHP. All I want is this: Read the PDF from a Flex app. GET the form field information. WRITE a new PDF with the form field values. I have found so many close but no cigar options ... and I have tried so many that failed. There are so many free PDF this and that out there. But Adobe seems to reserve the real functionality for themselves. All the free options don't seem to have access to the form data? Anyways I am so exhausted with looking for ways to do this. I need help!

    Read the article

  • Zend Namespace - Check if Session Exists

    - by Vincent
    All, I am using Zend Framework and Zend_Session to do global session management for my application. I plan to clear all sessions on logout and hence am using the following code: if($this->sessionExists()) { $this->destroy(); } But it seems like it's not doing a good job.. I am getting an error: PHP Warning: session_destroy() [<a href='function.session-destroy'> function.session-destroy</a>]: Trying to destroy uninitialized session How can I get rid of this error? Is there an alternative to sessionExists()?

    Read the article

  • JQuery URL Validator

    - by Vincent
    All, I am trying to use JQuery's URL Validator plugin. http://docs.jquery.com/Plugins/Validation/Methods/url I have a text box that has a URL. I want to write a function which takes the textbox value, uses the jquery's validator plugin to validate urls and returns true or false. Something like Ex: function validateURL(textval) { // var valid = get jquery's validate plugin return value if(valid) { return true; } return false; } I wanted this to be a reusable function.. Thanks

    Read the article

  • What time function do I need to use with pthread_cond_timedwait?

    - by Vincent
    The pthread_cond_timedwait function needs an absolute time in a time timespec structure. What time function I'm suppose to use to obtain the absolute time. I saw a lot of example on the web and I found almost all time function used. (ftime, clock, gettimeofday, clock_gettime (with all possible CLOCK_...). The pthread_cond_timedwait uses an absolute time. Will this waiting time affected by changing the time of the machine? Also if I get the absolute time with one of the time function, if the time of the machine change between the get and the addition of the delta time this will affect the affect the wait time? Is there a possibility to wait for an event with a relative time instead?

    Read the article

  • JavaScript Regex question

    - by Vincent
    All, I have following function to check for invalid symbols entered in a text box and return true or false. How can I modify this function to also check for occurrences like http:// and https:// and ftp:// return false if encountered ? function checkURL(textboxval) { return ! (/[<>()#'"]|""/.test(textboxval)); } Thanks

    Read the article

  • Is it possible to access JSON properties with relative syntax when using JSON defined functions?

    - by Justin Vincent
    // JavaScript JSON var myCode = { message : "Hello World", helloWorld : function() { alert(this.message); } }; myCode.helloWorld(); The above JavaScript code will alert 'undefined'. To make it work for real the code would need to look like the following... (note the literal path to myCode.message) // JavaScript JSON var myCode = { message : "Hello World", helloWorld : function() { alert(myCode.message); } }; myCode.helloWorld(); My question is... if I declare functions using json in this way, is there some "relative" way to get access to myCode.message or is it only possible to do so using the literal namespace path myCode.message?

    Read the article

  • Changing default REST routes in Rails 3

    - by Vincent
    I need to add one parameter to the default REST route for the show action for SEO purposes: resources :neighborhoods, :only => [:index, :show] neighborhood_url(neighborhood) # => /neighborhoods/lower-east-side I want something like the following: neighborhood_url(city, neighborhood) # => /neighborhoods/manhattan/lower-east-side What would be the easiest way to do this without using nested routes and without breaking Rails REST conventions?

    Read the article

  • model.matrix() with na.action=NULL?

    - by Vincent
    I have a formula and a data frame, and I want to extract the model.matrix(). However, I need the resulting matrix to include the NAs that were found in the original dataset. If I were to use model.frame() to do this, I would simply pass it na.action=NULL. However, the output I need is of the model.matrix() format. Specifically, I need only the right-hand side variables, I need the output to be a matrix (not a data frame), and I need factors to be converted to a series of dummy variables. I'm sure I could hack something together using loops or something, but I was wondering if anyone could suggest a cleaner and more efficient workaround. Thanks a lot for your time! And here's an example: dat <- data.frame(matrix(rnorm(20),5,4), gl(5,2)) dat[3,5] <- NA names(dat) <- c(letters[1:4], 'fact') ff <- a ~ b + fact # This omits the row with a missing observation on the factor model.matrix(ff, dat) # This keeps the NA, but it gives me a data frame and does not dichotomize the factor model.frame(ff, dat, na.action=NULL) Here is what I would like to obtain: (Intercept) b fact2 fact3 fact4 fact5 1 1 0.7266086 0 0 0 0 2 1 -0.6088697 0 0 0 0 3 NA 0.4643360 NA NA NA NA 4 1 -1.1666248 1 0 0 0 5 1 -0.7577394 0 1 0 0 6 1 0.7266086 0 1 0 0 7 1 -0.6088697 0 0 1 0 8 1 0.4643360 0 0 1 0 9 1 -1.1666248 0 0 0 1 10 1 -0.7577394 0 0 0 1

    Read the article

  • Null reference but it's not?

    - by Clint Davis
    This is related to my previous question but it is a different problem. I have two classes: Server and Database. Public Class Server Private _name As String Public Property Name() As String Get Return _name End Get Set(ByVal value As String) _name = value End Set End Property Private _databases As List(Of Database) Public Property Databases() As List(Of Database) Get Return _databases End Get Set(ByVal value As List(Of Database)) _databases = value End Set End Property Public Sub LoadTables() Dim db As New Database(Me) db.Name = "test" Databases.Add(db) End Sub End Class Public Class Database Private _server As Server Private _name As String Public Property Name() As String Get Return _name End Get Set(ByVal value As String) _name = value End Set End Property Public Property Server() As Server Get Return _server End Get Set(ByVal value As Server) _server = value End Set End Property Public Sub New(ByVal ser As Server) Server = ser End Sub End Class Fairly simple. I use like this: Dim s As New Server s.Name = "Test" s.LoadTables() The problem is in the LoadTables in the Server class. When it hits Databases.Add(db) it gives me a NullReference error (Object reference not set). I don't understand how it is getting that, all the objects are set. Any ideas? Thanks.

    Read the article

  • Implicit constructor available for all types derived from Base excepted the current type?

    - by Vincent
    The following code sum up my problem : template<class Parameter> class Base {}; template<class Parameter1, class Parameter2, class Parameter> class Derived1 : public Base<Parameter> { }; template<class Parameter1, class Parameter2, class Parameter> class Derived2 : public Base<Parameter> { public : // Copy constructor Derived2(const Derived2& x); // An EXPLICIT constructor that does a special conversion for a Derived2 // with other template parameters template<class OtherParameter1, class OtherParameter2, class OtherParameter> explicit Derived2( const Derived2<OtherParameter1, OtherParameter2, OtherParameter>& x ); // Now the problem : I want an IMPLICIT constructor that will work for every // type derived from Base EXCEPT // Derived2<OtherParameter1, OtherParameter2, OtherParameter> template<class Type, class = typename std::enable_if</* SOMETHING */>::type> Derived2(const Type& x); }; How to restrict an implicit constructor to all classes derived from the parent class excepted the current class whatever its template parameters, considering that I already have an explicit constructor as in the example code ? EDIT : For the implicit constructor from Base, I can obviously write : template<class OtherParameter> Derived2(const Base<OtherParameter>& x); But in that case, do I have the guaranty that the compiler will not use this constructor as an implicit constructor for Derived2<OtherParameter1, OtherParameter2, OtherParameter> ? EDIT2: Here I have a test : (LWS here : http://liveworkspace.org/code/cd423fb44fb4c97bc3b843732d837abc) #include <iostream> template<typename Type> class Base {}; template<typename Type> class Other : public Base<Type> {}; template<typename Type> class Derived : public Base<Type> { public: Derived() {std::cout<<"empty"<<std::endl;} Derived(const Derived<Type>& x) {std::cout<<"copy"<<std::endl;} template<typename OtherType> explicit Derived(const Derived<OtherType>& x) {std::cout<<"explicit"<<std::endl;} template<typename OtherType> Derived(const Base<OtherType>& x) {std::cout<<"implicit"<<std::endl;} }; int main() { Other<int> other0; Other<double> other1; std::cout<<"1 = "; Derived<int> dint1; // <- empty std::cout<<"2 = "; Derived<int> dint2; // <- empty std::cout<<"3 = "; Derived<double> ddouble; // <- empty std::cout<<"4 = "; Derived<double> ddouble1(ddouble); // <- copy std::cout<<"5 = "; Derived<double> ddouble2(dint1); // <- explicit std::cout<<"6 = "; ddouble = other0; // <- implicit std::cout<<"7 = "; ddouble = other1; // <- implicit std::cout<<"8 = "; ddouble = ddouble2; // <- nothing (normal : default assignment) std::cout<<"\n9 = "; ddouble = Derived<double>(dint1); // <- explicit std::cout<<"10 = "; ddouble = dint2; // <- implicit : WHY ?!?! return 0; } The last line worry me. Is it ok with the C++ standard ? Is it a bug of g++ ?

    Read the article

  • How to ReHash a password stored into my Database ? (PHP)

    - by Vincent Roye
    Hi! I have some passwords encrypted in my database and I would like to find a way to display them. Here is how they are saved into my mysql database: function generateHash($plainText, $salt = null){ if ($salt === null) { $salt = substr(md5(uniqid(rand(), true)), 0, 25); } else { $salt = substr($salt, 0, 25); } return $salt . sha1($salt . $plainText); } $secure_pass = generateHash($this->clean_password); Then $secure_pass is saved into my database. Anyone would have an idea ?? Thank you very much ;)

    Read the article

  • Get information from a higher class?

    - by Clint Davis
    I don't know really how to word the question so please bear with me... I have 3 classes: Server, Database, and Table. Each class has a "Name" property. How I want it to work is that each server can have multiple databases and each database can have multiple tables. So in the Server class I have this property. Private _databases As List(Of Database) Public Property Databases() As List(Of Database) Get Return _databases End Get Set(ByVal value As List(Of Database)) _databases = value End Set End Property And I have something similar in the Database class for the tables. This works fine now because I can do something like this to get all the databases in the server. For Each db In s.Databases 's being the server object Debug.Print(db.Name) Next I would like to expand these classes. I want the server class to handle all the connection information and I would like the other classes to use the server class's connection information in them. For example, I setup a server class and set the connection string to the server. Then I want the database class to use serverclass.connectionstring property to connect to the server and get a list of all the databases. But I want to keep that code in the database class. How can I do this? I've attached some code of what I want to do. Public Class Server Private _name As String Public Property Name() As String Get Return _name End Get Set(ByVal value As String) _name = value End Set End Property Private _databases As List(Of Database) Public Property Databases() As List(Of Database) Get Return _databases End Get Set(ByVal value As List(Of Database)) _databases = value End Set End Property End Class '-----New class Public Class Database Private _name As String Public Property Name() As String Get Return _name End Get Set(ByVal value As String) _name = value End Set End Property Private _tables As List(Of Table) Public Property Tables() As List(Of Table) Get Return _tables End Get Set(ByVal value As List(Of Table)) _tables = value End Set End Property 'This is where I need help! Private Sub LoadTables () dim connectionstring as string = server.connectionstring 'Possible? 'Do database stuff End Class Thanks for reading!

    Read the article

  • Variable Binding Class

    - by Davis
    Hi, I believe this is a tough one... I'm trying to create a collection of variable binding in a class. It is intended to look something like this: Dim x as integer, s as string Dim c as new VBindClass x = 1 s = "Hello" c.Add x, s Debug.Print c.value(x) '= 1 Debug.Print c.value(s) '= "Hello" Is there some function that allow us to retrieve a unique ID for a given variable and also get/set based on variable?

    Read the article

  • undo or reverse argsort(), python

    - by Vincent
    Given an array 'a' I would like to sort the array by columns "a.sort(axis=0)" do some stuff to the array and then undo the sort. By that I don't mean re sort but basically reversing how each element was moved. I assume argsort() is what I need but it is not clear to me how to sort an array with the results of argsort() or more importantly apply the reverse/inverse of argsort() Here is a little more detail I have an array a, shape(a) = rXc I need to sort each column aargsort = a.argsort(axis=0) # May use this later aSort = a.sort(axis=0) now average each row aSortRM = asort.mean(axis=1) now replace each col in a row with the row mean. is there a better way than this aWithMeans = ones_like(a) for ind in range(r) # r = number of rows aWithMeans[ind]* aSortRM[ind] Now I need to undo the sort I did in the first step. ????

    Read the article

  • How to check whether iterators form a contiguous memory zone?

    - by Vincent
    I currently have the following function to read an array or a vector of raw data (_readStream is a std::ifstream) : template<typename IteratorType> inline bool MyClass::readRawData( const IteratorType& first, const IteratorType& last, typename std::iterator_traits<IteratorType>::iterator_category* = nullptr ) { _readStream.read(reinterpret_cast<char*>(&*first), (last-first)*sizeof(*first)); return _readStream.good(); } First question : does this function seem ok for you ? As we read directly a block of memory, it will only work if the memory block from first to last is contiguous in memory. How to check that ?

    Read the article

  • Joomla Site Templates: Architecture Advise

    - by Vincent
    Our client provided us with html templates to turn into a Joomla template, problem is their designs are not Joomla Template friendly where a lot of the html design are not consistent with structure. Currently the only solution we have is applying a template structure pattern that fits the most amount of their design and have seperate joomla templates to take care of the ones that doesn't fit. We have the generic Joomla Template configured with different positions for each div and assign each article to its respective position in the template. Some articles though have menu modules within them so our solution is to split the article into two position and define positions for each menu module. Is this method better than defining module positions within an article content to render menus within an article? Is there a better way of showing articles in specific div positions than having each article be represented by a module to render in a specific div (position) in a template? Right now our current way of rendering an article(s) content to a specific position is to create a module (moduleAsArticle) and define that module a position. Create An Article - Assign A Module To It (moduleAsArticle) - Define that module a position

    Read the article

  • Looping in filemaker using a local variable

    - by Mike Davis
    Been programming in C# for a little bit - trying to use file maker and I cant believe it but I cant even get a simple for loop to work. What I want to do is simple: loop through for the amount of entries in my "amountOfRooms" field and create an entry in a table for each room. Sounds so simple, but I cant get it to work. Right now I have this: Set Variable[$cnt[Customers::AmountOfRooms]; value:1] Go to Layout["rooms"(Rooms)] Loop Exit Loop If[$cnt = Customers::AmountOfRooms] New Record / Request Set Variable[$cnt; Value: $cnt + 1] End Loop Exit Script No new records are created. I know the script is running because it does go to my layout, but doesnt create any new records. There is a "Repetition" field for my local variable - not sure how to use that or what it means? Any thoughts on how to do this simple loop? Thanks.

    Read the article

  • List.clear() followed by List.add() not working.

    - by Vincent
    I have the following C# Class/Function: class Hand { private List<Card> myCards = new List<Card>(); public void sortBySuitValue() { IEnumerable<Card> query = from s in myCards orderby (int)s.suit, (int)s.value select s; myCards = new List<Card>(); myCards.AddRange(query); } } On a card Game. This works fine, however, I had trouble at first, instead of using myCards = new List(); to 'reset' myCards, I would use myCards.clear(), however, once I called the clear function, I would not be able to call myCards.add() or myCards.addRange(). The count would stay at zero. Is my current approach good? Is using LINQ to sort my cards good/bad?

    Read the article

  • Template or function arguments as implementation details in doxygen?

    - by Vincent
    In doxygen is there any common way to specify that some C++ template parameters of function parameters are implementation details and should not be specified by the user ? For example, a template parameter used as recursion level counter in metaprogramming technique or a SFINAE parameter in a function ? For example : /// \brief Do something /// \tparam MyFlag A flag... /// \tparam Limit Recursion limit /// \tparam Current Recursion level counter. SHOULD NOT BE EXPLICITELY SPECIFIED !!! template<bool MyFlag, unsigned int Limit, unsigned int Current = 0> myFunction(); Is there any doxygen normalized option equivalent to "SHOULD NOT BE EXPLICITELY SPECIFIED !!!" ?

    Read the article

  • OEG11gR2 integration with OES11gR2 Authorization with condition

    - by pgoutin
    Introduction This OES use-case has been defined originally by Subbu Devulapalli (http://accessmanagement.wordpress.com/).  Based on this OES museum use-case, I have developed the OEG11gR2 policy able to deal with the OES authorization with condition. From an OEG point of view, the way to deal with OES condition is to provide with the OES request some Environmental / Context Attributes.   Museum Use-Case  All painting in the museum have security sensors, an alarm goes off when a person comes too close a painting. The employee designated for maintenance needs to use their ID and disable the alarm before maintenance. You are the Security Administrator for the museum and you have been tasked with creating authorization policies to manage authorization for different paintings. Your first task is to understand how paintings are organized. Asking around, you are surprised to see that there isno formal process in place, so you need to start from scratch. the museum tracks the following attributes for each painting 1. Name of the work 2. Painter 3. Condition (good/poor) 4. Cost You compile the list of paintings  Name of Painting  Painter  Paint Condition  Cost  Mona Lisa  Leonardo da Vinci  Good  100  Magi  Leonardo da Vinci  Poor  40  Starry Night  Vincent Van Gogh  Poor  75  Still Life  Vincent Van Gogh  Good  25 Being a software geek who doesn’t (yet) understand art, you feel that price(or insurance price) of a painting is the most important criteria. So you feel that based on years-of-experience employees can be tasked with maintaining different paintings. You decide that paintings worth over 50 cost should be only handled by employees with over 20 years of experience and employees with less than 10 years of experience should not handle any painting. Lets us start with policy modeling. All paintings have a common set of attributes and actions, so it will be good to have them under a single Resource Type. Based on this resource type we will create the actual resources. So our high level model is: 1) Resource Type: Painting which has action manage and the following four attributes a) Name of the work b) Painter c) Condition (good/poor) d) Cost 2) To keep things simple lets use painting name for Resource name (in real world you will try to use some identifier which is unique, because in future we may end up with more than one painting which has the same name.) 3) Create Resources based on the previous table 4) Create an identity attribute Experience (Integer) 5) Create the following authorization policies a) Allow employees with over 20 years experience to access all paintings b) Allow employees with 10 – 20 years of experience to access painting which cost less than 50 c) Deny access to all paintings for employees with less than 10 year of experience OES Authorization Configuration We do need to create 2 authorization policies with specific conditions a) Allow employees with over 20 years experience to access all paintings b) Allow employees with 10 – 20 years of experience to access painting which cost less than 50 c) Deny access to all paintings for employees with less than 10 year of experience We don’t need an explicit policy for Deny access to all paintings for employees with less than 10 year of experience, because Oracle Entitlements Server will automatically deny if there is no matching policy. OEG Policy The OEG policy looks like the following The 11g Authorization filter configuration is similar to :  The ${PAINTING_NAME} and ${USER_EXPERIENCE} variables are initialized by the "Retrieve from the HTTP header" filters for testing purpose. That's to say, under Service Explorer, we need to provide 2 attributes "Experience" & "Painting" following the OES 11g Authorization filter described above.

    Read the article

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