Daily Archives

Articles indexed Saturday March 20 2010

Page 14/89 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Internet Explorer percent based layout issue

    - by Tom
    Heya, My goal is to make a layout that is 200% width and height, with four containers of equal height and width (100% each), using no javascript as the bear minimum (or preferably no hacks). Right now I am using HTML5, and CSS display:table. It works fine in Safari 4, Firefox 3.5, and Chrome 5. I haven't tested it yet on older versions. Nonetheless, in IE7 and IE8 this layout fails completely. (I do use the Javascript HTML5 enabling script /cc../, so it should not be the use of new HTML5 tags) Here is what I have: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta charset="UTF-8" /> <title>IE issue with layout</title> <style type="text/css" media="all"> /* styles */ @import url("reset.css"); /* Generall CSS */ .table { display:table; } .row { display:table-row; } .cell { display:table-cell; } /* Specific CSS */ html, body { //overflow:hidden; I later intend to limit the viewport } section#body { position:absolute; width:200%; height:200%; overflow:hidden; } section#body .row { width:200%; height:50%; overflow:hidden; } section#body .row .cell { width:50%; overflow:hidden; } section#body .row .cell section { display:block; width:100%; height:100%; overflow:hidden; } section#body #stage0 section header { text-align:center; height:20%; display:block; } section#body #stage0 section footer { display:block; height:80%; } </style> </head> <body> <section id="body" class="table"> <section class="row"> <section id="stage0" class="cell"> <section> <header> <form> <input type="text" name="q" /> <input type="submit" value="Search" /> </form> </header> <footer> <table id="scrollers"> </table> </footer> </section> </section> <section id="stage1" class="cell"> <section> content </section> </section> </section> <section class="row"> <section id="stage2" class="cell"> <section> content </section> </section> <section id="stage3" class="cell"> <section> content </section> </section> </section> </section> </body> </html> You can see it live here: http://www.tombarrasso.com/ie-issue/

    Read the article

  • Redmine connecting to SVN through SSL

    - by Pekka
    I am having trouble connecting Redmine to a locally hosted subversion repository using SSL. I suspect it's the self-signed certificate that usually triggers a warning in the SVN client and browser. When I try to connect to the local repo through SSL in Redmine, I get a red "Revision not available" error. When I try connecting through svn://, the connection times out, and I have to restart the web server. Connecting without SSL works without problems. It would be nice to run subversion on SSL to make it safely accessible from the outside as well. I could run the repository through plain HTTP but would like SSL for outside communication. As far as I understand, subversion can't be run both ways at the same time. Does anybody know what to do in such a situation? Is there a configuration setting to ignore invalid certificates somewhere?

    Read the article

  • How to set up Gmail in Outlook when the ISP blocks SMTP?

    - by Revolter
    In Outlook, I'm setting up a Gmail account and I'm not able to send mails because my ISP is blocking SMTP forward. Any ways to bypass this? EDIT I've tried different settings, followed Gmail support inscructions and still not working. telnet smtp.gmail.com 465 telnet smtp.gmail.com 587 telnet smtp.gmail.com 25 all of them reply: Connecting To smtp.gmail.com...Could not open connection to the host, on port xxx : Connect failed and I don't have an email acount from my ISP.

    Read the article

  • Moq - How to mock a function call on a concrete object?

    - by dferraro
    Hello, How can I do this in Moq? Foo bar = new Foo(); Fake(bar.PrivateGetter).Return('whatever value') It seems I can only find how to mock an object that was created via the framework. I want to mock just a single method/property on a concrete object I've created... In TypeMock, I would just do Isolate.WhenCalled(bar.PrivateGetter).Returns('whatever value').. Any ideas?

    Read the article

  • Can you authenticate into SSAS with AD LDS (ADAM) accounts?

    - by Jaxidian
    I'm very new to AD LDS and experienced but not qualified with SSAS, so my apologies for my ignorances with these. We have a couple implementations where we expose SSAS via an HTTPS proxy (msmdpump.dll) and currently we have a temporary domain setup handling this (where our end-users have a second account+creds to manage because of this = non-ideal). I want to move us towards a more permanent solution which I'm thinking of moving all authentication to AD LDS for our web apps, SSAS, and others. However, SSAS is where I'm concerned about this. I know SSAS requires Windows Authentication and to play nicely, and that this ultimately means Active Directory will be involved. Is there a way to get this done with AD LDS instead of having to use a full AD DS implementation? If so, how?

    Read the article

  • Need Help With Simple Counting Bug in iPhone SDK

    - by seanny94
    So I'm basically making an app that adds a count to a number and then displays it each time you tap the button. However, the first tap issued doesn't take any action but adds one (just as planned) on the second tap. I've searched to the ends of the earth looking for the solution with no luck, so I'll see what you guys can make of this. :) #import "MainView.h" @implementation MainView int count = 0; -(void)awakeFromNib { counter.text = @"0"; } - (IBAction)addUnit { if(count >= 999) return; NSString *numValue = [[NSString alloc] initWithFormat:@"%d", count++]; counter.text = numValue; [numValue release]; } - (IBAction)subtractUnit { if(count <= 0) return; NSString *numValue = [[NSString alloc] initWithFormat:@"%d", count--]; counter.text = numValue; [numValue release]; } @end

    Read the article

  • NetBeans Tips and Tricks

    - by cdmckay
    I just saw an Eclipse tips & tricks post and was wondering if anyone had any tips & tricks for my IDE of choice: NetBeans. Here's a few I know and find to be useful: Removing a package: After you remove a package in NetBeans, it sticks around as a grayed-out package in your Project view. To get rid of that, switch to Files view and delete the directory. Alt-Insert (in Windows) opens up a Generate submenu at your cursor. A nice shortcut for quickly generating getters/setters (among other things). Selecting a chunk of code, right-clicking and then clicking "Refactor Introduce Method" will have NetBeans introduce a method, complete with arguments and return value. Of course you have to make sure the chunk of code only has one return value. Sometimes when you run a build and it crashes, the Java window sticks around at the bottom. I used to just click X until Windows let me End Task, but there's a nicer way to get rid of them. Click "Run Stop Build/Run" and NetBeans will close the window for you. It'll even let you close multiple applications at once. These may seem obvious to grizzled NetBeans developers, but I thought they might be useful for NetBeans newbs like me. Anyone else have any tips/tricks to share? Here are some from the comments: NetBeans allows for code templates. You can even add yours on the Code Templates tab under the Editor settings on the Options window. Some examples: Type sout and hit the tab key as a shorcut for System.out.println("") Type psvm and hit the tab key as a shorcut for public static void main(String args[]) {} Ctrl Shift C: Comments out the selected block of code. Alt Shift F: Formats the selected block of code. Ctrl E: Deletes current line. Ctrl Shift I: Fixes your imports, handy if you've just written a piece of code that needs a lot of packages imported.

    Read the article

  • Getting Vars to bind properly across multiple files

    - by Alex Baranosky
    I am just learning Clojure and am having trouble moving my code into different files. I keep detting this error from the appnrunner.clj - Exception in thread "main" java.lang.Exception: Unable to resolve symbol: -run-application in this context It seems to be finding the namespaces fine, but then not seeing the Vars as being bound... Any idea how to fix this? Here's my code: APPLICATION RUNNER - (ns src/apprunner (:use src/functions)) (def input-files [(resource-path "a.txt") (resource-path "b.txt") (resource-path "c.txt")]) (def output-file (resource-path "output.txt")) (defn run-application [] (sort-files input-files output-file)) (-run-application) APPLICATION FUNCTIONS - (ns src/functions (:use clojure.contrib.duck-streams)) (defn flatten [x] (let [s? #(instance? clojure.lang.Sequential %)] (filter (complement s?) (tree-seq s? seq x)))) (defn resource-path [file] (str "C:/Users/Alex and Paula/Documents/SoftwareProjects/MyClojureApp/resources/" file)) (defn split2 [str delim] (seq (.split str delim))) (defstruct person :first-name :last-name) (defn read-file-content [file] (apply str (interpose "\n" (read-lines file)))) (defn person-from-line [line] (let [sections (split2 line " ")] (struct person (first sections) (second sections)))) (defn formatted-for-display [person] (str (:first-name person) (.toUpperCase " ") (:last-name person))) (defn sort-by-keys [struct-map keys] (sort-by #(vec (map % [keys])) struct-map)) (defn formatted-output [persons output-number] (let [heading (str "Output #" output-number "\n") sorted-persons-for-output (apply str (interpose "\n" (map formatted-for-display (sort-by-keys persons (:first-name :last-name)))))] (str heading sorted-persons-for-output))) (defn read-persons-from [file] (let [lines (read-lines file)] (map person-from-line lines))) (defn write-persons-to [file persons] (dotimes [i 3] (append-spit file (formatted-output persons (+ 1 i))))) (defn sort-files [input-files output-file] (let [persons (flatten (map read-persons-from input-files))] (write-persons-to output-file persons)))

    Read the article

  • phpmailer with hotmail?

    - by nikola
    I'm trying to send emails from my server by a PHP script. I used to send it by a native php function mail and everything worked OK. Here's the code I used: $to = $sMail;<br> $subject = $sSubject;<br> $message = $sMessage; $headers = 'From: [email protected]' . "\r\n";<br> $headers .= 'Reply-To: [email protected]' . "\r\n";<br> $headers .= 'MIME-Version: 1.0' . "\r\n";<br> $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";<br> $bRes = mail($to, $subject, $message, $headers); I then switched to PHPMailer, and wasn't able to send mail to Hotmail accounts (all the other still worked). Hotmail server reports the error: "550 SC-001 Mail rejected by Windows Live Hotmail for policy reasons." This is the code I used for PHPMailer: $mail = new PHPMailer();<br> $mail->IsHTML(true);<br> $mail->CharSet = 'UTF-8';<br> $mail->From = '[email protected]';<br> $mail->FromName = 'domain.com';<br> $mail->Subject = $sSubject;;<br> $mail->Body = $sMessage;<br> $mail->AltBody = strip_tags($sMessage;);<br> $mail->AddAddress($sMail);<br> $mail->Send();<br> $mail->ClearAddresses();<br> $mail->ClearAttachments(); As the sending works with the native function, I'm sure my server is able to send mails to hotmail. There must be a property to set when using PHPMailer, but I can't seem to find the right one. Anyone knows something abouth this? Thank you very much!

    Read the article

  • Android's RelativeLayout Unit Test setup

    - by dqminh
    i'm trying to write an unit test for my Android's RelativeLayout. Currently, my testcode setup is as follow: public class SampleRelativeLayoutTest extends AndroidTestCase { private ViewGroup testView; private ImageView icon; private TextView title; @Override protected void setUp() throws Exception { super.setUp(); // inflate the layout final Context context = getContext(); final LayoutInflater inflater = LayoutInflater.from(context); testView = (ViewGroup) inflater.inflate(R.layout.sample_layout, null); // manually measure and layout testView.measure(500, 500); testView.layout(0, 0, 500, 500); // init variables icon = (ImageView) testView.findViewById(R.id.icon); title = (TextView) testView.findViewById(R.id.title); } However, I encountered NullPointerException with the following stack trace java.lang.NullPointerException at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:427) at android.view.View.measure(View.java:7964) at com.dqminh.test.view.SampleRelativeLayoutTest.setUp(SampleRelativeLayoutTest.java:33) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:430) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447) What should I change in my setUp() code to make the test run properly ?

    Read the article

  • RIM facilite la mise à jour des applications BlackBerry avec Push, un nouvel outil pour les développ

    RIM facilite la mise à jour des applications BlackBerry avec Push, un nouvel outil pour les développeurs La bataille fait rage entre les différents constructeurs de smartphones, à celui qui proposera le plus d'applications, et bien sûr les meilleures. Dans ce marché tendu, BlackBerry sait que pour conserver ses utilisateurs, il doit leur apporter un catalogue de petits programmes sans cesse renouvelés, utiles et divertissants. Research In Motion (la firme propriétaire de la marque BlackBerry) a donc fait un mouvement en ce sens en dévoilant son Push Service. A l'attention des développeurs utilisant l'OS BlackBerry, cette offre apporte des mises à jour qui sont directement implémentées au logiciel sans l'interrompre...

    Read the article

  • Detect click on URL in RichEdit

    - by Tofig Hasanov
    I am trying to update RichEdit so that it detects URL and enables clicking on it to open in the browser. Detecting URL is easy, I just use the following code from http://www.scalabium.com/faq/dct0146.htm mask := SendMessage(MNote.Handle, EM_GETEVENTMASK, 0, 0); SendMessage(MNote.Handle, EM_SETEVENTMASK, 0, mask or ENM_LINK); SendMessage(MNote.Handle, EM_AUTOURLDETECT, Integer(True), 0); but the second part doesn't work for me. They give the following code to capture EN_LINK message and processing it: type TForm1 = class(TForm) protected procedure WndProc(var Message: TMessage); override; end; ... procedure TForm1.WndProc(var Message: TMessage); var p: TENLink; strURL: string; begin if (Message.Msg = WM_NOTIFY) then begin if (PNMHDR(Message.LParam).code = EN_LINK) then begin p := TENLink(Pointer(TWMNotify(Message).NMHdr)^); if (p.msg = WM_LBUTTONDOWN) then begin SendMessage(RichEdit1.Handle, EM_EXSETSEL, 0, LongInt(@(p.chrg))); strURL := RichEdit1.SelText; ShellExecute(Handle, 'open', PChar(strURL), 0, 0, SW_SHOWNORMAL); end end end; inherited; end; When I run the program, URL is detected, but clicking on it doesn't do anything. Using debug I found out that Message.Msg = WM_NOTIFY is not true when I click on URL. I then tried to override TRichEdit's WndProc, but result is the same. Any suggestions?

    Read the article

  • How to limit setAccessible to only "legitimate" uses?

    - by polygenelubricants
    The more I learned about the power of setAccessible, the more astonished I am at what it can do. This is adapted from my answer to the question (Using reflection to change static final File.separatorChar for unit testing). import java.lang.reflect.*; public class EverythingIsTrue { static void setFinalStatic(Field field, Object newValue) throws Exception { field.setAccessible(true); Field modifiersField = Field.class.getDeclaredField("modifiers"); modifiersField.setAccessible(true); modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); field.set(null, newValue); } public static void main(String args[]) throws Exception { setFinalStatic(Boolean.class.getField("FALSE"), true); System.out.format("Everything is %s", false); // "Everything is true" } } You can do truly outrageous stuff: public class UltimateAnswerToEverything { static Integer[] ultimateAnswer() { Integer[] ret = new Integer[256]; java.util.Arrays.fill(ret, 42); return ret; } public static void main(String args[]) throws Exception { EverythingIsTrue.setFinalStatic( Class.forName("java.lang.Integer$IntegerCache") .getDeclaredField("cache"), ultimateAnswer() ); System.out.format("6 * 9 = %d", 6 * 9); // "6 * 9 = 42" } } Presumably the API designers realize how abusable setAccessible can be, but must have conceded that it has legitimate uses to provide it. So my questions are: What are the truly legitimate uses for setAccessible? Could Java has been designed as to NOT have this need in the first place? What would the negative consequences (if any) of such design be? Can you restrict setAccessible to legitimate uses only? Is it only through SecurityManager? How does it work? Whitelist/blacklist, granularity, etc? Is it common to have to configure it in your applications?

    Read the article

  • Problem with DWR and Android-Browser

    - by moxn
    Hello everyone, I am experiencing a problem with accessing an application from the Android-browser. The application uses DWR to persist connections to the clients that are connected with it. Everything works fine for me, except that if the application does not send any data to the client on the Android-phone for 2 minutes, the connection seems to be lost and no data arrive at the client. The same scenario works just fine on Firefox, Opera and Chrome. If the pause between two data transfers is less than 2 minutes, it works just fine. So, now my question: Is there some timeout setting for the android browser that I am missing? Or is this some built-in bug/feature/whatever that I cannot circumvent? I know that I could prevent this from happening with some sort of heartbeat, I would just like to why this is happening. Thanks in advance, Max btw: Everything (server, clients) runs on my machine and I am testing this on the android emulator with Windows XP Android emulator version 1.10 (build_id CUPCAKE-150240)

    Read the article

  • What effects drawing charts/diagrams from $_SESSION data under php5, which worked under php4?

    - by ste_php
    Hello, I have a script generating 3 diagrams from $_SESSION variables which work fine under php4 with register_globals = off, but when I parse the same script as php5 I get no diagram. The diagrams a drawn from GD libary and it works, if I set the data into an Array (manually filled) within the script file. But I need a way to get it work on php5, without much changes. Are there any SESSION settings or php-settings which might interfere with my script. I already checked a lot of the php-settings (changing php.ini over and over again), but found nothing what brings me the diagrams back. Hopefully someone of you could kick me into the right direction. Any Ideas? Thanks a lot.

    Read the article

  • Using jQuery.get with a file up a directory?

    - by gct
    I'm using jQuery to write a simple utility app that's just run locally. It'll read from a list of files using jQuery.get and then display them along with some meta-data (which resides in a separate file). The images and meta files live in ../scored_images/*.[jpg|meta] I can load the file list with jQuery.get just fine (it's in the current directory), and I can load up the images and display them without a problem. However when I go to load the meta file for display, jQuery.get seems to silently fail. I can load them fine if the path doesn't have ../ in it. Is there a way to work around this behavior?

    Read the article

  • How to create instances of related models in Django

    - by sevennineteen
    I'm working on a CMSy app for which I've implemented a set of models which allow for creation of custom Template instances, made up of a number of Fields and tied to a specific Customer. The end-goal is that one or more templates with a set of custom fields can be defined through the Admin interface and associated to a customer, so that customer can then create content objects in the format prescribed by the template. I seem to have gotten this hooked up such that I can create any number of Template objects, but I'm struggling with how to create instances - actual content objects - in those templates. For example, I can define a template "Basic Page" for customer "Acme" which has the fields "Title" and "Body", but I haven't figured out how to create Basic Page instances where these fields can be filled in. Here are my (somewhat elided) models... class Customer(models.Model): ... class Field(models.Model): ... class Template(models.Model): label = models.CharField(max_length=255) clients = models.ManyToManyField(Customer, blank=True) fields = models.ManyToManyField(Field, blank=True) class ContentObject(models.Model): label = models.CharField(max_length=255) template = models.ForeignKey(Template) author = models.ForeignKey(User) customer = models.ForeignKey(Customer) mod_date = models.DateTimeField('Modified Date', editable=False) def __unicode__(self): return '%s (%s)' % (self.label, self.template) def save(self): self.mod_date = datetime.datetime.now() super(ContentObject, self).save() Thanks in advance for any advice!

    Read the article

  • PHP CodeIgniter Framework - Thoughts on developing with it?

    - by Sootah
    I've been reviewing different frameworks to use for my next couple of major web applications, and after days of research am almost set on using CodeIgniter. The reason I'm leaning towards CI is that so far it looks to be the best suited for me. It doesn't require constant command-line access (I am currently using shared hosting; the projects do not warrant a dedicate server yet), nothing special has to be installed on the server running it (you just upload the framework to the root of whatever your developing), and they appear to have some excellent documentation, videos, and tutorials on how to get started. Do any of you have experience with CodeIgniter? If so, what is your opinion of it and its features? What had you developed with it, and what types of applications is it best suited to create? I certainly don't want to get into a situation where I'm trying to bend a framework to do something that it isn't well-suited for. Both of my projects will be database-driven apps that will require user registration, the ability to manipulate data that is specific to their account (their posts, listings, user account details, etc), amongst other things. Also, if you have any other PHP framework suggestions, I am open to them. Thanks in advance for your help! -Sootah

    Read the article

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