Count to 80, skipping every 5th number in a range of 100 numbers

I’m working on a quiz with 80 numbered questions. After every 4 questions there will be an unnumbered 5th bonusquestion. These 100 questions have index-numbers (1-100) in a database table. Maybe it’d have been more logical to use a separate table for the bonusquestions, but the client wants the questions in one table in that […]

how to get a full string from user using KeyboardEvents?

I am using starling and actionscript, and have managed to listen to my keyboard. My problem is; How do I get a full string from the user? I am able to understand the keyboard code for each separate key stroke, but what is the usual practice for getting a full string (which may be viewed […]

leading (line spacing) in mx textArea Flex

I have project in Framework 4.6 but using textArea Of mx 3.6 it cant be changed to spark richeditable text and it gives strange result around it’s leading amount.. i mean line spacing it gives strange results where i try to make pdf looks completely diiferent from it… 1) if i can found some component […]

Cant change font in Flex – Spark RadioButton

I am trying to change the font size and family of a spark Radiobutton I create in run time: var radio:RadioButton = new RadioButton; radio.layoutDirection = “rtl”; var format:TextFormat = new TextFormat(); format.font = “Tahoma”; format.color = 0×336699; format.size = 13; radio.setStyle(“embedFonts”, true); radio.setStyle(“textFormat”, format); radio.label = text; radio.groupName = “radiogrp_” + index.toString(); hgrp.addElement(radio); No […]

vba + Selection.Paste into outlook + control poition

What I am trying to do is copy a chart from excel into an outlook email, but after numerous searching I am struggling. i am having trouble positioning where the chart is pasted. I want it to paste after the last line “this is another line again ” in the body of the email. It […]

PHP mail form doesnt complete sending e-mail

<?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $from = ‘From:’; $to = ‘’; $subject = ‘Customer Inquiry’; $body = “From: $name\n E-Mail: $email\n Message:\n $message”; if ($_POST['submit']) { if (mail ($to, $subject, $body, $from)) { echo ‘<p>Your message has been sent!</p>’; } else { echo ‘<p>Something went wrong, go back and […]

animated image wipe for waveform color change

I have a UIImage of a waveform that is created from the samples of an audio file. The waveform is blue with a white background. I want the blue waveform to change to red as the audio is playing to indicate the progress. If I have two UIImage’s of the same waveform: one in blue […]

PHP bulk emails without cron job

I’m currently building a wordpress plugin for a charity, and am wondering what my options are for sending out bulk emails. They have an event once a year, and before the event, they need to send out 600-1,200+ emails, from a list of emails in their database. I was thinking about building an emailing system, […]

Edit email distribution list in iReport 4.5.0?

I have an existing report in Jaspersoft iReport Designer 4.5.0 that is automatically sent to a list of email recipients daily. How do I edit this list of email recipients? The report is composed of: Main jrxml Input controls folder Resources folder I apologize for any lack of information, but I have never used this […]

Sprite layers are disappearing in AS3 drawing code

I’m building a custom painting application, and I’m running into a problem where the layers I’m adding to the canvas are disappearing after 24 layers get added. Here is my code for the drawing tools: //===================================================================================================================================== // DRAWING FUNCTIONS //————————————————————————————————————————————- protected function onMouseDown_canvas( evt:MouseEvent ):void { var p:Point = new Point( _realView.mouseX, _realView.mouseY ); _log.log( […]

Python Script Stops After Sending Email

Im trying to get back into learning python, so I’ve been working on writing this simple keylogger. What it does is copy itself to %appdata%\keylogs\ and also creates an output file there. Once the file reaches 1mb it sends the file as an attachment via email. The problem is right when it sends, it just […]

UITableView, breaks with 6+ rows

I am really stuck with this problem, it seems really odd, and I hope someone is able to see the issue! I have a tableview controller, which I am populating from an array of dictionaries. Each cell has a label, and a text field. The user enters a value into the text field, then presses […]

NSScanner not scanning long numeric string into number

I have a string “999999999999528106″ and I am passing it to NSScanner but the output is not correct. I get 2147483647 as result. I guess the big size of my string is not fitting into the NSInteger. Any clue NSScanner *aScanner = [NSScanner scannerWithString:iString]; NSMutableCharacterSet *aCharset = [NSMutableCharacterSet whitespaceAndNewlineCharacterSet]; [aCharset formUnionWithCharacterSet:[NSCharacterSet symbolCharacterSet]]; [aScanner setCharactersToBeSkipped:[aCharset copy]]; […]

iAds on 3.5 Iphone not appearing

I have set up iAds for my app, but for whatever reason, they only appear on the iphone 4 inch and not the 3.5 inch. First, I thought it had something to do with the Auto Layout, so I made sure the BannerView appeared in both screen sizes. After doing so, I ran and still […]

Regex to escape quotes and return paramters

I have a regular expression @(?<parameter>[\w_]+) which is used to @ at the beginning and will consider it as parameter and will split the string for further processing. Everything was good till i had email address as a parameter. Whenever I try to work with email address, regex will split it at @. I am […]

JWebServices. Printing the body of a message

I am trying to make a program that will neatly print all the bodies of the messages of my inbox yet exchange web services is making it difficult. I seem to have easy access to everything except the body of the message. This is what I’m doing right now static final int SIZE = 10; […]

Servers mail dont receive email with attachment successfully using headers mail() php

That’s my first question, I hope someone can help me with my problem. =( =( =( I want to send a e-mail with zip attachment using mail() php. I have this code: $file = $path.$filename; $content = chunk_split(base64_encode(file_get_contents($file))); $uid= md5(uniqid(time())); $bound=”–”.$uid.”\r\n”; $last_bound=”–”.$uid.”–\r\n”; $header = “From: “.$from_name.” <”.$from_mail.”>\r\n”; $header .= “MIME-Version: 1.0″.”\r\n”; $header .= “Content-Type: multipart/mixed; […]

Basecamp API: Error Configuring the return type with invalid property name

I am working in flash builder (FB) 4.6 and came across a problem when trying to configure the return type on an http data service. When FB tries to call the service I get the error message and it stops. Error message: the returned object contains an invalid property name “private” that does not conform […]

Get the "Default email client" on local computer

In my VC2008 app, how can get the “Default email client” on the local computer? And if the “Default email client” is Outlook, how to know its version? Thanks   Asked By – user2704265        Read Answers     0   

Outlook does not recognize one or more names

I have following vba code which reads a mailbox and sends reply to any users who send a invalid code as a reply to the mailbox, but sometimes the run time error (Outlook does not recognize one or more names) is received. My questions are, Will creation of new MAPI profile resolve the issue or […]

Scrollbar failure with arguments

Another fun question for a usually simple task: a scrollbar. For starters, I’m aware that an Enter_Frame function needs to be placed in the startDragging function in order for the scrolling code to work. Trouble is, I can’t get that far. Here’s the code: import flash.geom.Rectangle; import; //establishes the size of the scroller knob […]

How to spoof email legitimately

Say I have 2 domains: They both send their own email via What SPF and DKIM records do I need to add to in order to send email from addresses belonging to and (I already have a private key generated for DKIM) The purpose of this is we have […]

Rails 4 ActiveMailer: email loses attachments

This is in a Rails 4 app. I’m trying to send emails with attachments for the first time. It’s a really basic test email: class Emailer < ActionMailer::Base def test_attachments attachments['file.pdf'] =‘/path/to/file.pdf’) mail(to:, from:, body: “”) end end Emailer.test_attachments.deliver This results in an error. IndexError string not matched Looking at the API […]

Is it possible to configure 2 email hosts using EmailMessage?

I want to send an email from different email host depending on the status. Heres the pseudo-code Currently using django send_mail and EmailMessage for the core.mail module if status == “accepted”: letter = Letter().accept # send from currentmail msg = EmailMessage(‘blah blah’, letter, ‘currentmail’, []) else: letter = Letter().decline # send from other mail host […]

<style> not working as intended for <table> on Outlook 2007

Problematic < style> tags don’t seem to work properly in an Email sent to Outlook 2007. Context I use an server to send an Email with a table. This table has the inputs that the client entered. What it should do PrintScreened from JSFiddle What it does PrintScreened from Outlook 2007 message. Stipulations The […]

Is it possible to handle a query string on an img src url with Rails 4

I am working on a rails project where I handle sending out daily newsletters. I was looking into email analytics and think it would be great if I could do some basic stuff within my app such as just seeing if the messages get opened (And hopefully have a process to stop sending them if […]

Error reading varchar field db2 with jpa

I’m getting an error every time I try to fill an attribute from my Javaclass with the information stored in a Db2 table. Only the String Attribute is causing trouble. I use JPA (EclipseLink) The Field with the Problem is “name1″ and is declared in my class as a String variable. The error only happens […]

AdMob: enable test ads for all devices

You have to specify each device for test ads: request.testDevices = [NSArray arrayWithObjects:@"3222e18ddc56b034fdf816e0d93ee7a1", GAD_SIMULATOR_ID, nil]; I want to send Ad Hoc release for someone and I want him to see test ads. Is it possible?   Asked By – user1561346        Read Answers     0   

How to avoid repeated similar "mapping class=package.className" in hibernate.cfg.xml?

In hibernate.cfg.xml I wrote following rows: <mapping class=”” /> I have a lot of same rows. I want to replace all these rows by one like this: <mapping package=”” /> But after it I see org.hibernate.MappingException: Unknown entity: How to resolve my problem?   Asked By – gstackoverflow        Read Answers     0   

Criteria Query JPA : insert into select

Is it possible to do the following SQL query with CriteriaQuery (EclipseLink) ? INSERT INTO my_table (SELECT columns FROM other_table)   Asked By – Libert Piou Piou        Read Answers     0   

pushViewController not able to push view for iPhone-4

I am not able to push a viewcontroller on iPhone-4 but same code is working with iPhone-5 code is follows UIStoryboard * bgstoryboard = nil; bgstoryboard =[UIStoryboard storyboardWithName:SCAN_STORYBOARD_NAME bundle:nil]; UIViewController * page = [bgstoryboard instantiateViewControllerWithIdentifier:SCAN_SCENE_PURCHASECODE_NAME]; [self.navigationController pushViewController:page animated:NO];   Asked By – Piyush        Read Answers     0   

Resolve DNS, export to Excel and HTML, then send mail

I was almost done with my script and did some late night editing and written over my old version so I cannot go back. The script was running fine, still needed some tweaks but now it ha come to a complete halt. The idea is to GC a list of IP’s. Resolve the IP’s and […]

Facebook.init failure as3

I updated to the latest facebook api and now it’s not working at all. A simple test which worked previously now throws up the error below : 1061: Call to a possibly undefined method init through a reference with static type Class. I import the facebook class – import com.facebook.graph.Facebook; I put these in incase […]

Why is Hibernate not creating database for MySQL?

I have following hibernate.cfg.xml: <?xml version=”1.0″ encoding=”utf-8″?> <!DOCTYPE hibernate-configuration PUBLIC “-//Hibernate/Hibernate Configuration DTD 3.0//EN” “”> <hibernate-configuration> <session-factory> <property name=”connection.url”>jdbc:mysql://localhost:3306/userdb</property> <property name=”connection.username”>root</property> <property name=”connection.password”>1234</property> <property name=”connection.driver_class”>com.mysql.jdbc.Driver</property> <property name=”dialect”>org.hibernate.dialect.MySQL5Dialect</property> <property name=”show_sql”>true</property> <property name=”format_sql”>true</property> <property name=””>create</property> <property name=”connection.pool_size”>1</property> <property name=”current_session_context_class”>thread</property> <mapping class=”com.beingjavaguys.hbn.User” /> </session-factory> </hibernate-configuration> I tryed another dialect(org.hibernate.dialect.MySQLDialect) but I see old result pom.xml: … <dependencies> <dependency> […]

loop through complex xml nodes actionscript

I am reading an xml file in actionscript. I need to loop through each node named “entry” as showing in below image :- Can anyone help me ? I am trying below code. but it not working :- var categoryList:XMLList = x.feed.@entry; for each(var category:XML in categoryList) { trace(category.@name); for each(var item:XML in category.item) { […]

Native cursor in Adobe AIR JavaScript with MouseCursorData

I’ve been reading this article: on how to create a native cursor in AIR without having to hack it by moving a sprite in place of a hidden cursor to fake it. However I’m using HTML/JavaScript instead of ActionScript. So far I have: function nativeCursor(){ // load in a bitmap var loader = new […]

Render SWF to FLV/MP4

I’m doing a simple video editing solution with flash. The solution should be able to play multiple flv/mp4 files one after another start playing at certain time (simulate trimming) show image at x/y for n time show text at x/y for n time Very basic features. All of this can be done with flash. I […]

AS3 character movement – making the character jump

I’m making a (really) simple platform game for a school project with a little help from different online tuts. For a couple of days I have been trying to make the character jump. I don’t get any errors and if i test it with a trace statement the statement appears in the output. I tried […]

Hibernate does not create columns of @embeddable classes by

As you can see in this topic, JPA how to supply inheritance relationships for embeddable objects, I have embeddable classes for each unit type. I have an entity A with following definition @Entity @Table(name = “class_x”) @PrimaryKeyJoinColumn(name = “class_x_id”) public class ClassX { /** * */ private static final long serialVersionUID = -4924441463209260247L; public ClassX […]

Tabular column in iOS

Is there a way to use UITableview in iPhone to show data in tabular format, just like Excel which has many columns that doesn’t fit in 320px width? It has almost 15 columns and 15 rows. Thanks in advance.   Asked By – Fr33KiLL        Read Answers     0   

Error in loading As2 file in As3 file

I have some old files/activities which are developed using Actionscript2 and one main file(main menu) which is developed in Actionscript 3. I am loading Actionscript 2 files in main file using loader, every files are working fine apart from the files which contain ‘Drag and drop activities’. Please anybody let me know how to solve […]

math behind translationInView:

I’m not able to get the underlying mechanism with which translationInView: works to handle panning gesture.. I read in the doc that it does not measure the decrease or increase in pan from the last if i move a line 2 pts forward along x as well as y axes, then the translation.x=2 and […]

Need bundle with javax.persistence on OSGi

I get this error when I try to install my bundle in Servicemix: Error executing command: Error starting bundles: Unable to start bundle 179: Unresolved constraint in bundle de.edigrid.edigrid-servicemix-util [179]: Unable to resolve 179.0: missing requirement [179.0] osgi.wiring.package; (osgi.wiring.package=javax.persistence) Can anybody tell me if is there a standard jar file, OSGi compliant, that exports javax.persistence […]

How to pass list of Java objects to a stored procedure from JPA

We have a requirement in which we have to call a stored procedure from JPA (eclipselink) which takes list of oracle object as input. Is there a way to achieve this?   Asked By – user3815986        Read Answers     0   

Flex: How to examine if document is loaded in iFrame?

I’m using an iFrame to show documents in an flex app using ExternalInterface. Is there any way (events?) to examine when document loading finished?   Asked By – user3815834        Read Answers     0   

Spring Data JPA Repository Queries – How to map @Param value to multiple parameter types

I have implemented following JPA Repository query for some common search functionality. But with that query, due to age is a Integer value and mapping Parameter is String value I got some exception as follow. Is there any mechanism to implicitly casting parameter to relevant data type instead of we do that. Thanks. Query with […]

How to move the uielement with mouse

i am doing one application.In that i have one eraser functionality.If i select the eraser from tool box,when the user try to touch the screen for erase,eraser image will come where user touch the screen.So and user try to erase,the some marks,eraser will be move all sides with user finger.How to do these things.   […]

Scala Numeric-Like for custom Classes

I’ve created some Value Classes in Scala 2.10.2 to represent units of electricity, e.g. Voltage, Current, Power, Energy etc. They are only allowed to be combined in particular sensible ways, e.g. you can multiply Voltage by Current, but not Voltage by Energy. A common use case is working out the total energy over a sequence […]

Hibernate merge with @OneToOne relation and orphanremoval set to true, with new entity not delete the old one

I have a simple case. When I try to merge child entity witch containt new parent entity (with autogenerated id) I would like to delete old related parent entity. But it not do anything. Child: @OneToOne(cascade = CascadeType.ALL, mappedBy = “child”, orphanRemoval = true) private Parent parent; Parent: @JoinColumn(name = “child_id”) @OneToOne private Child child; […]

Scala Map to Arbitrary Class (Scala Reflection)

If I have a Scala Map val map = Map(“a” -> true, “b” -> “hello” “c” -> 5) Is there a way I can convert this to an object (case class, regular class, anything really) such that I can access the field like this: val obj = map.toObj println(obj.a) println(obj.b) Without knowing what the parameters […]

Next Page »