Search Results

Search found 597 results on 24 pages for 'christian muller'.

Page 16/24 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • MYSQL, Subquery Reference in Union

    - by christian
    Is there any way to reference a subquery in a union? I am trying to do something like the following, and would like to avoid a temporary table, but the subquery will be drawn from a much larger dataset so it makes sense to only do it once.. SELECT * FROM (SELECT * FROM ads WHERE state='FL' AND city='Maitland' AND page='home' ORDER BY RAND()) AS sq WHERE spot = 'full-banner' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'leaderboard' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'rectangle1' LIMIT 1 UNION SELECT * FROM sq WHERE spot = 'rectangle2' LIMIT 1 .... etc,, It's a shame that DISTINCT can't be specified for a single column of a result set.

    Read the article

  • Shared static classes between AppDomains in loaded library code

    - by Christian Stewart
    I'm working on a program in which I want to do something similar to what the Photon Server system does: Offer a common "API" class library, which contains common data classes, enumerations, and interfaces for working with the host program. Have client programs (class libraries) reference this DLL and implement interfaces listed within it. Have the "host" application load built DLL client libraries into separate AppDomains and reference the interfaces that lie within to have polymorphic client code from within a dll file. I have something like this worked out: a class library that contains common code, but I've run into the following question How should I handle static classes? Should I add a method that is called by the host program to synchronize data? How do I keep a static class the same between AppDomains? Should I discard these classes in favor of better interfaces between the code levels? And in general, how do I share data between these loaded AppDomains?

    Read the article

  • Ubuntu 8.04 LTS MySQL port remote access

    - by Stig Christian
    Hi! I have tried everything I know, but still no solution to this problem. MySQL works perfectly on localhost, but it seems port 3306 is blocked from the outside... I have commented out "bind-address" in /etc/mysql/my.cnf, and there is no iptables rules that deny this port. (I have even opened the port in iptables just to be sure) Still I can`t connect to the server from a remote connection (telnet or portscan returns negative results). Where is the problem?

    Read the article

  • Allowed characters in linux environment variable names

    - by Christian Semrau
    What characters are allowed in linux environment variable names? My cursory search of man pages and the web did only produce information about how to work with variables, but not which names are allowed. I have a Java program that requires an defined environment variable containing a dot, like com.example.fancyproperty. With Windows I can set that variable, but I had no luck setting it in linux (tried in SuSE and Ubuntu). Is that variable name even allowed?

    Read the article

  • Laravel - Mail class Exception

    - by Christian Giupponi
    I need to send email within my app and this is my code: if( $agent->save() ) { //Preparo la mail da inviare con i dati di login $data = [ 'nome' => $input['nome'], 'cognome' => $input['cognome'], 'email' => $input['email'], 'password' => $input['password'] ]; //ATTENZIONE //Questo è da rimuovere in produzione, finge di inviare la mail Mail::pretend(); //Recuero il template e passo alla funzione i dati Mail::send('emails.agents.registration', $data, function($message) use ($data) { $message->to( $data['email'], $data['nome'].' '.$data['cognome'] )->subject('Benvenuto!'); }); return Redirect::action('admin.agents.index')->with('positive_flash_message', 'Agente inserito correttamente.'); } As you can see I have use the Mail::pretend to avoid the email send in development, the problem is that I get this error every time I try to send an email: Undefined property: Illuminate\Mail\Message::$email (View: /var/www/progetti/app/views/emails/agents/registration.blade.php) nd this is my blade view: Email: {{ $message->email }} Password: {{ $message->password }} What's wrong with $message?

    Read the article

  • opening and viewing a file in php

    - by Christian Burgos
    how do i open/view for editing an uploaded file in php? i have tried this but it doesn't open the file. $my_file = 'file.txt'; $handle = fopen($my_file, 'r'); $data = fread($handle,filesize($my_file)); i've also tried this but it wont work. $my_file = 'file.txt'; $handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); $data = 'This is the data'; fwrite($handle, $data); what i have in mind is like when you want to view an uploaded resume,documents or any other ms office files like .docx,.xls,.pptx and be able to edit them, save and close the said file. edit: latest tried code... <?php // Connects to your Database include "configdb.php"; //Retrieves data from MySQL $data = mysql_query("SELECT * FROM employees") or die(mysql_error()); //Puts it into an array while($info = mysql_fetch_array( $data )) { //Outputs the image and other data //Echo "<img src=localhost/uploadfile/images".$info['photo'] ."> <br>"; Echo "<b>Name:</b> ".$info['name'] . "<br> "; Echo "<b>Email:</b> ".$info['email'] . " <br>"; Echo "<b>Phone:</b> ".$info['phone'] . " <hr>"; //$file=fopen("uploadfile/images/".$info['photo'],"r+"); $file=fopen("Applications/XAMPP/xamppfiles/htdocs/uploadfile/images/file.odt","r") or exit("unable to open file");; } ?> i am getting the error: Warning: fopen(Applications/XAMPP/xamppfiles/htdocs/uploadfile/images/file.odt): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/uploadfile/view.php on line 17 unable to open file the file is in that folder, i don't know it wont find it.

    Read the article

  • How can I fade in a JPanel & children?

    - by Christian 'fuzi' Orgler
    I know that I can fade in a panel, by adding the alpha value to the background color & a timer. But how can I fade in a panel with child components (like a JLabel)? EDIT _fadeTimer = new Timer(40, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (_alpha == 255) { _fadeTimer.stop(); } else { pnl_hint.setBackground(new Color( bgColor.getRed(), bgColor.getGreen(), bgColor.getBlue(), (_alpha += 1))); pnl_hint.updateUI(); } } }); _fadeTimer.start();

    Read the article

  • Pull news from an RDF Feed using Ruby and Nokogiri?

    - by Christian
    I would like to pull the titleand description fields from the newsfeed at http://www.tagesschau.de/newsticker.rdf to feed them to the Mac's Text-to-Speech engine. My search for a nice Ruby Gem to do this has brought me to Nokogiri, but all examples that "pull something out" of a given XML seem to be centered around CSS somehow. Does anyone have any idea how to save the titleand description fields in an array?

    Read the article

  • best way to build iphone settings screen

    - by Christian Schlensker
    I'm building a settings screen for an iPhone app and it is supposed to resemble a grouped table view. Each "cell" should behave like a button. Most cells just have a image view, label view, and disclosure indicator. One will display a value in addition to a label. All of these buttons will present a new view when tapped. Now, how to implement this? I was considering just laying out a set of buttons with custom background images, or would it be best to just use a table view. If that's the case what should it be implemented. So far I've only used table views to display some kind of dynamic data in which each cell displayed the same basic detail view. I'm most curious to figure out how to setup cellForRowAtIndexPath. Would this contain some sort of switch statement to configure each cell individually, or is there an easier way to handle all this?

    Read the article

  • Free java or flash file browser for photogallery

    - by Christian
    Hi. I'm about to develop a small web gallery, where it's supposed to be possible to upload several pictures at a time and then add some info abut the pictures.So I need a free java or flash local file browser that can pass me some info of the pictures that gets uploaded so that I can create some SQL entries for each picture. The platform for the project will be PHP and MySQL. Any good recommendations?

    Read the article

  • In LaTeX, is there a way to get long lines along the margins?

    - by Christian Jonassen
    I'm working on a report, and some elements are outside the margins (but some are just barely outside the margins). I was wondering: Is there a way to make two vertical lines, one on each side, along the margins so that one can easily see if it goes outside them? (Googling it, I only found information about margin notes.) A figure is below: |report text goes here| |more text goes also h|ere |and so on and so fort|h It would certainly make correcting these kinds of mistakes very trivial. :) Feel free to post answers that would solve/show this problem in a more "LaTeX-correct" way, if that makes any sense at all.

    Read the article

  • how to swap array-elements to transfer the array from a column-like into a row-like representation

    - by Christian Ammer
    For example: the array a1, a2, a3, b1, b2, b3, c1, c2, c3, d1, d2, d3 represents following table a1, b1, c1, d1 a2, b2, c2, d2 a3, b3, c3, d3 now i like to bring the array into following form a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3 Does an algorithm exist, which takes the array (from the first form) and the dimensions of the table as input arguments and which transfers the array into the second form? I thougt of an algorithm which doesn't need to allocate additional memory, instead i think it should be possible to do the job with element-swap operations.

    Read the article

  • Why is Routes.rb not loading the IPs from cache?

    - by Christian Fazzini
    I am testing this in local. My ip is 127.0.0.1. The ip_permissions table, is empty. When I browse the site, everything works as expected. Now, I want to simulate browsing the site with a banned IP. So I add the IP into the ip_permissions table via: IpPermission.create!(:ip => '127.0.0.1', :note => 'foobar', :category => 'blacklist') In Rails console, I clear the cache via; Rails.cache.clear. I browse the site. I don't get sent to pages#blacklist. If I restart the server. And browse the site, then I get sent to pages#blacklist. Why do I need to restart the server every time the ip_permissions table is updated? Shouldn't it fetch it based on cache? Routes look like: class BlacklistConstraint def initialize @blacklist = IpPermission.blacklist end def matches?(request) @blacklist.map { |b| b.ip }.include? request.remote_ip end end Foobar::Application.routes.draw do match '/(*path)' => 'pages#blacklist', :constraints => BlacklistConstraint.new .... end My model looks like: class IpPermission < ActiveRecord::Base validates_presence_of :ip, :note, :category validates_uniqueness_of :ip, :scope => [:category] validates :category, :inclusion => { :in => ['whitelist', 'blacklist'] } def self.whitelist Rails.cache.fetch('whitelist', :expires_in => 1.month) { self.where(:category => 'whitelist').all } end def self.blacklist Rails.cache.fetch('blacklist', :expires_in => 1.month) { self.where(:category => 'blacklist').all } end end

    Read the article

  • Is it possible to establish default values for inherited fields in subclasses?

    - by Christian Mann
    I'm trying to establish a default value for inherited fields from superclasses. So, my class hierarchy is thus: Character - Enemy - Boss                 \                   - Hero Each Character has a public static char avatar to represent him on an ASCII playing field. How do I set a default value for the avatar of each class inherited from Character? Thank you!

    Read the article

  • Jquery passing an HTML element into a function

    - by christian
    I have an HTML form where I am going to copy values from a series of input fields to some spans/headings as the user populates the input fields. I am able to get this working using the following code: $('#source').keyup(function(){ if($("#source").val().length == 0){ $("#destinationTitle").text('Sample Title'); }else{ $("#destinationTitle").text($("#source").val()); } }); In the above scenario the html is something like: Sample Title Basically, as the users fills out the source box, the text of the is changed to the value of the source input. If nothing is input in, or the user deletes the values typed into the box some default text is placed in the instead. Pretty straightforward. However, since I need to make this work for many different fields, it makes sense to turn this into a generic function and then bind that function to each 's onkeyup() event. But I am having some trouble with this. My implementation: function doStuff(source,target,defaultValue) { if($(source).val().length == 0){ $(target).text(defaultValue); }else{ $(target).text($(source).val()); } } which is called as follows: $('#source').keyup(function() { doStuff(this, '"#destinationTitle"', 'SampleTitle'); }); What I can't figure out is how to pass the second parameter, the name of the destination html element into the function. I have no problem passing in the element I'm binding to via "this", but can't figure out the destination element syntax. Any help would be appreciated - many thanks!

    Read the article

  • Using FieldSelector when searching with Lucene

    - by Christian
    I'm searching articles in PubMed via Lucene. Each of the 20,000,000 articles has an abstract with ~250 words and an ID. At the moment I store my searches, with each take multiple seconds, in a TopDocs object. Searchs can find thousands of articles. I'm just interested in the ID of the article. Does Lucene load the abstracts internally into the TopDocs? If so can I prevent that behavior through FieldSelectors or do FieldSelectors only work with IndexReader and don't work with IndexSearcher?

    Read the article

  • Compare filedate before download it

    - by Christian
    Hi, I have an app which is downloading several plist-files when starting the app and storing them in the NSHomeDirectory/Documents/ path. This will take some time and often there is only one file that changed. My questions are: -how can I get the date of the files (the stored one and the file on my webserver)? -how can I compare the date of the stored file with the date of the file on my webserver?

    Read the article

  • Magento order status change events

    - by Christian
    Hi people, I want to change via web service a remote inventory, I know that via Event Observer Method can triger my code, but I don't know which event is useful to complete my task, like on_order_complete, is there an updated list of events or more documentation?

    Read the article

  • Using TDD: "top down" vs. "bottom up"

    - by Christian Mustica
    Since I'm a TDD newbie, I'm currently developing a tiny C# console application in order to practice (because practice makes perfect, right?). I started by making a simple sketchup of how the application could be organized (class-wise) and started developing all domain classes that I could identify, one by one (test first, of course). In the end, the classes have to be integrated together in order to make the application runnable, i.e. placing necessary code in the Main method which calls the necessary logic. However, I don't see how I can do this last integration step in a "test first" manner. I suppose I wouldn't be having these issues had I used a "top down" approach. The question is: how would I do that? Should I have started by testing the Main() method? If anyone could give me some pointers, it will be much appreciated.

    Read the article

  • Preview of code-only WPF controls in VS2010 - how?

    - by Christian
    Hi, I hope I am able to illustrate the problem using a lot of images. First of all, I was no real fan of XAML (Silverlight issues, crashes in Preview, and so on...) Now, with VS2010 the situation has become better. There are still a lot of things I like better in code, but I also want a preview in my VS. So, take a look at the following control: It is really simple, a todo details list. The first screenshot shows the code of the control, pretty straighforward: There is no XAML, so obviously no preview. Of course, I could encapsulate it in another control, like shown in the next screenshot: But, in that case I have an additional file I do not want or need. So I had the idea to move the init stuff inside the contructor of a XAML control. For simplicity, I used simple elements. But they do not show up in the preview... Finally, I know I could use the controls in other parts of my app when creating UIs. But I am using layout manager, PRISM and a lot of other stuff, so I just want an easy preview of some specific control I created (without having to have a XAML wrapper file for each control) Thanks for help, and sorry for the post structure, but I though with images it is better to understand... Chris

    Read the article

  • Why doesn't JQuery hover animate work in this example

    - by Christian
    When I hover over the box it doesn't change it's caller as I intent. What's wrong? <html> <head><title>test</title></head> <style type="text/css" > .box_type1{ width:560px; height:560px; background-color:#b0c4de; } </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('.box_type1').hover( function () { $(this).stop().animate({backgroundColor:'#4E1402'}, 300); }, function () { $(this).stop().animate({backgroundColor:'#943D20'}, 100); }); }); </script> <body> </div> <div class="box_type1"> </div> </body> </html>

    Read the article

  • [jQuery] Any HTML tags inside of tooltip cause basic tooltip to close on hover.

    - by Christian
    Hi. I'm new to jQuery, in fact any kind of AJAX / JavsScript (although not new to PHP, xHTML and CSS). Anyway I'm trying to achieve a "tooltip-like" effect, where I can hover over a div...the new div fades in above it and then when I exit the div the "tooltip" fades out. So here's the basic jQuery I've managed to scrap together reading the odd guide here and there: $(function() { $('#sn-not-logged-in').hover(function() { $('#sn-not-logged-in-hover').fadeIn('medium'); }); $('#sn-not-logged-in-hover').mouseout(function() { $('#sn-not-logged-in-hover').fadeOut('medium'); }); }); Problem is if I put "any" html tag inside the div that hovers in, the second you roll over it the div fades back out. Any ideas how this can be fixed? Cheers.

    Read the article

  • Please clarify how create/update happens against child entities of an aggregate root

    - by christian
    After much reading and thinking as I begin to get my head wrapped around DDD, I am a bit confused about the best practices for dealing with complex hierarchies under an aggregate root. I think this is a FAQ but after reading countless examples and discussions, no one is quite talking about the issue I'm seeing. If I am aligned with the DDD thinking, entities below the aggregate root should be immutable. This is the crux of my trouble, so if that isn't correct, that is why I'm lost. Here is a fabricated example...hope it holds enough water to discuss. Consider an automobile insurance policy (I'm not in insurance, but this matches the language I hear when on the phone w/ my insurance company). Policy is clearly an entity. Within the policy, let's say we have Auto. Auto, for the sake of this example, only exists within a policy (maybe you could transfer an Auto to another policy, so this is potential for an aggregate as well, which changes Policy...but assume it simpler than that for now). Since an Auto cannot exist without a Policy, I think it should be an Entity but not a root. So Policy in this case is an aggregate root. Now, to create a Policy, let's assume it has to have at least one auto. This is where I get frustrated. Assume Auto is fairly complex, including many fields and maybe a child for where it is garaged (a Location). If I understand correctly, a "create Policy" constructor/factory would have to take as input an Auto or be restricted via a builder to not be created without this Auto. And the Auto's creation, since it is an entity, can't be done beforehand (because it is immutable? maybe this is just an incorrect interpretation). So you don't get to say new Auto and then setX, setY, add(Z). If Auto is more than somewhat trivial, you end up having to build a huge hierarchy of builders and such to try to manage creating an Auto within the context of the Policy. One more twist to this is later, after the Policy is created and one wishes to add another Auto...or update an existing Auto. Clearly, the Policy controls this...fine...but Policy.addAuto() won't quite fly because one can't just pass in a new Auto (right!?). Examples say things like Policy.addAuto(VIN, make, model, etc.) but are all so simple that that looks reasonable. But if this factory method approach falls apart with too many parameters (the entire Auto interface, conceivably) I need a solution. From that point in my thinking, I'm realizing that having a transient reference to an entity is OK. So, maybe it is fine to have a entity created outside of its parent within the aggregate in a transient environment, so maybe it is OK to say something like: auto = AutoFactory.createAuto(); auto.setX auto.setY or if sticking to immutability, AutoBuilder.new().setX().setY().build() and then have it get sorted out when you say Policy.addAuto(auto) This insurance example gets more interesting if you add Events, such as an Accident with its PolicyReports or RepairEstimates...some value objects but most entities that are all really meaningless outside the policy...at least for my simple example. The lifecycle of Policy with its growing hierarchy over time seems the fundamental picture I must draw before really starting to dig in...and it is more the factory concept or how the child entities get built/attached to an aggregate root that I haven't seen a solid example of. I think I'm close. Hope this is clear and not just a repeat FAQ that has answers all over the place.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >