Thursday 15 September 2011

ruby on rails - Configure MX to both SendGrid and Google Apps in order to use sendgrid parse API -



ruby on rails - Configure MX to both SendGrid and Google Apps in order to use sendgrid parse API -

i utilize google apps mx records.

so have email utilize send emails in sendgrid:

support@mycompany.com

now, want parse emails sent straight back upwards email , come in in app using parse api.

the problem i'll have set mx records, create both google apps , sendgrid works, i'll have create subdomain like:

support@mail.mycompany.com

right now, have reputation first email.

am gonna lose if have create subdomain , start parsing emails?

currently, reputation has lot more ip domain (although providers, domain plays part). so, switching back upwards emails support@mail.example.com not end of world.

however, if want prevent this, there couple solutions can use:

reply-to, while still sending support@example.com have reply-to of support@mail.example.com (or taken step further, $unique_ticket_hash@mail.example.com). you'll see github , zendesk emails. this best. forwarding, can setup google apps business relationship forwards every email support@example.com support@mail.example.com. however, means you're counting on google apps , running back upwards emails work. while safe assumption still adds unnecessary complexity system.

ruby-on-rails sendgrid mx-record

dependency injection - Can Python do DI seamlessly without relying on a service locator? -



dependency injection - Can Python do DI seamlessly without relying on a service locator? -

i'm coming c# world, views may little skewed. i'm looking di in python, i'm noticing trend libraries appear rely on service locator. is, must tie object creation framework, such injectlib.build(myclass) in order instance of myclass.

here illustration of mean -

from injector import injector, inject class inner(object): def __init__(self): self.foo = 'foo' class outer(object): @inject(inner=inner) def __init__(self, inner=none): if inner none: print('inner not provided') self.inner = inner() else: print('inner provided') self.inner = inner injector = injector() outer = outer() print(outer.inner.foo) outer = injector.get(outer) print(outer.inner.foo)

is there way in python create class while automatically inferring dependency types based on parameter names? if have constructor parameter called my_class, instance of myclass injected. reason inquire don't see how inject dependency class gets created automatically via 3rd party library.

to reply question explicitly asked: no, there's no built-in way in python automatically myclass object parameter named my_class.

that said, neither "tying object creation framework" nor illustration code gave seem terribly pythonic, , question in general kind of confusing because di in dynamic languages isn't big deal.

for general thoughts di in python i'd this presentation gives pretty overview of different approaches. specific question, i'll give 2 options based on might trying do.

if you're trying add together di own classes, utilize paramaters default values in constructor, presentation shows. e.g:

import time class example(object): def __init__(self, sleep_func=time.sleep): self.sleep_func = sleep_func def foo(self): self.sleep_func(10) print('done!')

and pass in dummy sleep function testing or whatever.

if you're trying manipulate library's classes through di, (not can imagine utilize case for, seems you're asking) monkey patch classes alter whatever needed changing. e.g:

import test_module def dummy_sleep(*args, **kwargs): pass test_module.time.sleep = dummy_sleep e = test_module.example() e.foo()

python dependency-injection

php - jQuery AJAX fails to update database after full page is finished loading -



php - jQuery AJAX fails to update database after full page is finished loading -

this first time using jquery ajax bear me. trying create button website similar facebook button. user must logged on via facebook pull userid database. when user clicks on button, inserts row database user info , page info. if there entry user , page, update row.

my code runs fine on localhost. can click on button day , image alter , forth unlike , back. database updates every time no problem.

when upload live server, script runs fine point. 1 time page finishes loading completely, database no longer updates click. images alter usual , receive alert('success') no changes made actual database.

<?php $tempstat = '1'; if ($stmt = $mysqli -> prepare("select count(id) votes businessid=? , status=? ")) { $stmt -> bind_param('ss', $businessid, $tempstat); $stmt -> execute(); $stmt->bind_result($likecount); $stmt->fetch(); $stmt->close(); } if ($likecount == '') { $likecount = 0; } ?> <style> #karmabar { padding-left: 4px; } #counter { margin: 0 auto; text-align: center; width: 50px; height: 25px; background-image: url('/images/karma-counter.png'); } p#counter { font-size: 12px; padding-top: 5px; } .karma { margin: 0 auto; font-size: 16px; color: blue; text-align: center; padding: 5px; } </style> <?php if(login_check($mysqli) == true) { $userid = $_session['userurl']; if ($stmt = $mysqli -> prepare("select status votes userid=? , businessid=? ")) { $stmt -> bind_param('ss', $userid, $businessid); $stmt -> execute(); $stmt -> bind_result($like_status); $stmt->fetch(); $stmt->close(); } if ($like_status == '' or $like_status == null) { $like_status = '0'; } ?> <script type="text/javascript"> $(document).ready(function() { $('#like_post').click(function() { $.ajax({ url: "/includes/like.php", type: "get", data: 'userid=<?php echo $userid; ?>&businessid=<?php echo $businessid; ?>&like_status=1', success: function() { alert("success"); }, error: function() { alert("something went wrong"); } }); $('#counter').html(function(i, val) { homecoming val*1+1 }); $('#like_post').hide(); $('#unlike_post').show(); }); $('#unlike_post').click(function() { $.ajax({ url: "/includes/like.php", type: "get", data: 'userid=<?php echo $userid; ?>&businessid=<?php echo $businessid; ?>&like_status=0', success: function() { alert("success"); }, error: function() { alert("something went wrong"); } }); $('#counter').html(function(i, val) { homecoming val*1-1 }); $('#unlike_post').hide(); $('#like_post').show(); }); }); </script> <div id="karmabar"> <table cellpadding="0px"> <?php if ($like_status == '0') { ?> <tr><td><a href="javascript:;" id="unlike_post" class="hide"><img src="/images/karma-active.png" title="undo karma" /></a><a href="javascript:;" id="like_post"><img src="/images/karma-inactive.png" title="spread karma" /></a><td><p id="counter"><?php echo $likecount; ?></p></td></tr> <?php } else { ?> <tr><td><a href="javascript:;" id="unlike_post"><img src="/images/karma-active.png" title="undo karma" /></a><a href="javascript:;" id="like_post" class="hide"><img src="/images/karma-inactive.png" title="spread karma" /></a></td><td><p id="counter"><?php echo $likecount; ?></p></td></tr> <?php } ?> </table> </div> <?php } else { ?> <div id="karmabar"> <table cellpadding="0px"> <tr><td><a href="#" onclick="alert('login facebook spread karma');" ><img src="/images/karma-inactive.png" title="spread karma" /></a><td><p id="counter"><?php echo $likecount; ?></p></td></tr> </table> </div>

$businessid , $userid both defined higher on page.

like.php

<?php include_once $_server['document_root'].'/includes/db_connect.php'; include_once $_server['document_root'].'/includes/functions.php'; $userid = $_get['userid']; $businessid = $_get['businessid']; $ip = $mysqli->real_escape_string(getclientip()); $like_status = $_get['like_status']; if ($stmt = $mysqli -> prepare("select count(id) votes userid=? , businessid=? ")) { $stmt -> bind_param('ss', $userid, $businessid); $stmt -> execute(); $stmt ->bind_result($count); $stmt ->fetch(); $stmt ->close(); } if ($count == '1') { if ($stmt = $mysqli -> prepare("update votes set ip=?, status=? userid=? , businessid=? ")) { $stmt -> bind_param('ssss', $ip, $like_status, $userid, $businessid); $stmt -> execute(); $stmt -> close(); $mysqli -> close(); } } if ($count == '0') { if ($stmt = $mysqli -> prepare("insert votes (userid, businessid, ip, status) values ( ?, ?, ?, ? ) ")) { $stmt -> bind_param('ssss', $userid, $businessid, $ip, $like_status ); $stmt -> execute(); $stmt -> close(); $mysqli -> close(); } } ?>

i appreciate help guys can give me. said, i'm new kind of coding , looking pointers may have.

mike, i'm not sure what's going on, maybe can seek using type of ajax request / php returns problem shoot:

replace entire ajax function this:

$(document).ready(function() { $('#like_post').click(function() { $.post("/includes/like.php", {userid:<?php echo $userid; ?>, businessid:<?php echo $businessid; ?>, like_status:"1"}, function(data){ alert(data); //check see beingness returned if(data == 1){ //later, can echo "1" in php file on success //this success alert("success"); $('#counter').html(function(i, val) { homecoming val*1+1 }); $('#like_post').hide(); $('#unlike_post').show(); } else { //this failure alert("failure"); } }); }); $('#unlike_post').click(function() { $.post("/includes/like.php", {userid:<?php echo $userid; ?>, businessid:<?php echo $businessid; ?>, like_status:"0"}, function(data){ alert(data); //check see beingness returned if(data == 1){ //later, can echo "1" in php file on success //this success alert("success"); $('#counter').html(function(i, val) { homecoming val*1-1 }); $('#unlike_post').hide(); $('#like_post').show(); } else { //this failure alert("failure"); } }); }); });

and here php - notice, changed $_gets $_posts , added echo @ end. explain why after.

<?php include_once $_server['document_root'].'/includes/db_connect.php'; include_once $_server['document_root'].'/includes/functions.php'; $userid = $_post['userid']; $businessid = $_post['businessid']; $like_status = $_post['like_status']; $ip = $mysqli->real_escape_string(getclientip()); if ($stmt = $mysqli -> prepare("select count(id) votes userid=? , businessid=? ")) { $stmt -> bind_param('ss', $userid, $businessid); $stmt -> execute(); $stmt ->bind_result($count); $stmt ->fetch(); $stmt ->close(); echo "got count: " . $count; } if ($count == '1') { echo "the count 1"; if ($stmt = $mysqli -> prepare("update votes set ip=?, status=? userid=? , businessid=? ")) { $stmt -> bind_param('ssss', $ip, $like_status, $userid, $businessid); $stmt -> execute(); $stmt -> close(); $mysqli -> close(); echo "and post successful (1)"; } } if ($count == '0') { echo "the count 0"; if ($stmt = $mysqli -> prepare("insert votes (userid, businessid, ip, status) values ( ?, ?, ?, ? ) ")) { $stmt -> bind_param('ssss', $userid, $businessid, $ip, $like_status ); $stmt -> execute(); $stmt -> close(); $mysqli -> close(); echo "and post successful (0)"; } } echo "finished"; ?>

basically - i've added in bunch of echos able 'listen' $.post ajax phone call when returns data. if successful, should sentence returned saying "got count: 1thecount 1 , post successful(1)finished". of echos should fire when post successful. if don't 1 of sentences, has gone wrong.

try problem shoot , allow know comes back.

php jquery ajax mysqli

javascript - Display one Drupal block or another if flash is enabled -



javascript - Display one Drupal block or another if flash is enabled -

in drupal 7 site have view 2 block displays. difference between both 1 filter criteria -url aias-: 1 block shows content "/html5" in alias , other shows "/flash" url aliased content

those blocks must dispalyed on certains pages. logic controlled context module based on url. in way, block showed if url "perm/type/man/*"

at url need display 1 block or depending on flash content enabled or not @ device level: if device back upwards flash (like pc) flash content must dislayed. if device doesn't back upwards flash (mobile), html5 content shown.

i found js code observe if flash enabled on device

var hasflash = false; seek { var fo = new activexobject('shockwaveflash.shockwaveflash'); if (fo) { hasflash = true; } } grab (e) { if (navigator.mimetypes && navigator.mimetypes['application/x-shockwave-flash'] != undefined && navigator.mimetypes['application/x-shockwave-flash'].enabledplugin) { hasflash = true; } }

but don't know nor must include code.

can help me?

you may seek add together above code file or inline script drupal_add_js , go on follows:

load both blocks on same page initialy hidden , show 1 meets conditions in js. or load right block's content ajax , dump dom based on desired criteria.

javascript html5 flash drupal-7 drupal-views

c++ - How to add multi digit integers in a reverse polish calculator -



c++ - How to add multi digit integers in a reverse polish calculator -

// file: calc.h #include <iostream> #include <stack> // uses stl #include <string> // uses stl using namespace std; void evaluate_stack_tops(stack<double> & numbers, stack<char> & operations); double read_and_evaluate(string line) { const char right_parenthesis = ')'; stack<double> numbers; // local stack object stack<char> operations; // local stack object double number; char symbol; size_t position = 0; while (position < line.length()) { if (isdigit(line[position])) { number = line[position++] - '0'; // value numbers.push(number); } else if (strchr("+-*/", line[position]) != null) { symbol = line[position++]; operations.push(symbol); } else if (line[position] == right_parenthesis) { position++; evaluate_stack_tops(numbers, operations); } else position++; } if (!operations.empty()) evaluate_stack_tops(numbers, operations); homecoming numbers.top(); } void evaluate_stack_tops(stack<double> & numbers, stack<char> & operations) { double operand1, operand2; operand2 = numbers.top(); numbers.pop(); operand1 = numbers.top(); numbers.pop(); switch (operations.top()) { case '+': numbers.push(operand1 + operand2); break; case '-': numbers.push(operand1 - operand2); break; case '*': numbers.push(operand1 * operand2); break; case '/': numbers.push(operand1 / operand2); break; } operations.pop(); } // file: use_stack.cpp #include <iostream> using namespace std; #include "calc.h" int main() { double answer; string line; cout << "type parenthesized arithmetic look (single digits only!):\n"; getline(cin, line); reply = read_and_evaluate(line); cout << "that evaluates " << reply << endl; system("pause"); homecoming 0; }

everything works , can input simple things "2 4 3 * + 7 – 2 +" if wanted input "123 60 +" not work. separated in 2 header files. can give me hint on how take multi-digit integers?

one way solve problem find number, instead of assuming 1 digit long, utilize loop collect other digits part of number. loop terminate when encounters non-digit, or space.

a improve way tokenize input string using stringstream. in scenario, set entire line of input string , utilize while loop similar following:

stringstream ss(line); string token; while (ss >> token) { // stuff token }

c++ stack calculator postfix-notation

Autowiring of Spring Data Repo fails with Maven Skinny war option -



Autowiring of Spring Data Repo fails with Maven Skinny war option -

my question similar this 1 posted while ago autowiring of spring info repos fail when external libraries in ear's lib folder.

the wiring works fine when jars included in web-inf/lib. tried setting 'skinnywar' false duplicating jars in both ear , war.

the application uses spring batch admin 1.2.2 , spring info 1.1 spring 3.2.2 based. maven version used 3.3. runtime websphere 7.x

i have application works fine skinnywar set true - uses spring-ws, spring-data 4.0.x version.

the war pom

<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <artifactid>batchadmin-web</artifactid> <parent> <groupid>com.xyz.interfaces</groupid> <artifactid>batch-parent</artifactid> <version>1.0.build-snapshot</version> <relativepath>../batch-parent/pom.xml</relativepath> </parent> <packaging>war</packaging> <name>batch admin interface web</name> <dependencies> <!-- application specific jars/modules not included brevity--> </dependencies> <build> <finalname>springbatch-admin</finalname> <outputdirectory>${project.basedir}\src\main\webapp\web-inf\classes</outputdirectory> <testoutputdirectory>${project.basedir}\src\main\webapp\web-inf\classes</testoutputdirectory> <plugins> <plugin> <artifactid>maven-war-plugin</artifactid> <version>2.4</version> <configuration> <archive> <manifest> <addclasspath>true</addclasspath> <classpathprefix>lib/</classpathprefix> </manifest> </archive> <packagingexcludes>web-inf/lib/spring-beans*.jar</packagingexcludes> </configuration> </plugin> </plugins> </build> </project>

the ear pom content:

<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <artifactid>batchadmin-ear</artifactid> <parent> <groupid>com.xyz.interfaces</groupid> <artifactid>batch-parent</artifactid> <version>1.0.build-snapshot</version> <relativepath>../batch-parent/pom.xml</relativepath> </parent> <packaging>ear</packaging> <name>batch admin interface</name> <dependencies> <dependency> <groupid>com.xyz.interfaces</groupid> <artifactid>batchadmin-web</artifactid> <type>war</type> <version>${project.version}</version> </dependency> </dependencies> <build> <finalname>springbatchear</finalname> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-ear-plugin</artifactid> <version>2.9.1</version> <configuration> <skinnywars>true</skinnywars> <defaultlibbundledir>lib/</defaultlibbundledir> <modules> <webmodule> <groupid>com.xyz.interfaces</groupid> <artifactid>batchadmin-web</artifactid> <contextroot>/springbatch-admin</contextroot> <bundlefilename>springbatch-admin.war</bundlefilename> </webmodule> </modules> </configuration> </plugin> </plugins> </build>

update: since ear has 1 web module, used 'single class loader application' 'war class loader policy' in websphere. way, able create work.

i know how create work without changing classloader alternative might not preferred when multiple web modules present.

spring maven spring-data spring-batch-admin

meteor - App is broken after 0.9.4 update: undefined is not a function in dynamic_template.js:371 -



meteor - App is broken after 0.9.4 update: undefined is not a function in dynamic_template.js:371 -

i had meteor 0.9.3 app working.

i ran meteor update. have bunch or errors (60 total):

uncaught typeerror: undefined not function dynamic_template.js:371 uncaught typeerror: cannot read property 'prototype' of undefined helpers.js:140 uncaught typeerror: undefined not function router.js:61 uncaught typeerror: cannot read property 'routecontroller' of undefined iron-router-progress.js?2b52a697e5a2fba4ec827721c08cfdd0a5bae508:25 uncaught typeerror: cannot read property 'routecontroller' of undefined global-imports.js?a26cc176b56b3d2b1df619ec7af99630b0fb6a1f:3 uncaught referenceerror: template not defined template.about.js?3ead3e2cab8a60252235e31f2533c2179f736294:2 uncaught referenceerror: template not defined template.register.js?60e4180bd0193951fab290d41493f5036f66240d:2 ... 53 more errors: ... "template not defined" , "meteor not defined"

line 371 of dynamic_template.js following:

ui.registerhelper('dynamictemplate', template.__create__('dynamictemplatehelper', function () {

what's wierd if seek go meteor update --release 0.9.3 or 0.9.2, still have errors. i'm stuck, have prepare those.

another anoying thing everytime start meteor server, updating bundle catalog progress bar, , server takes while (~10s) start up.

any ideas?

in 0.9.4 there changes templating api. see history.md on gihub/meteor/meteor more details.

the prepare immediate problem replace ui template

template.registerhelper('dynamictemplate', template.__create__('dynamictemplatehelper', function () {

meteor meteor-0.9.4

java - Wicket: Palette set default selected -



java - Wicket: Palette set default selected -

i'm trying implement palette. seek set default selected list it's empty.

mylists:

// here set of categorys in grouping set<category> selectedcategorysset = new hashset<category>(); selectedcategorysset = group.getcategorys(); // here categorys exists list<category> listcategory = new arraylist<category>(); listcategory = catdao.getall(category.class); list<category> selectedcats = new arraylist<category>(); list<category> tmplist = new arraylist<category>(); // palette doesnt take set added set list selectedcats.addall(selectedcategorysset); // here delete every category whole list selected (stored in temporary list) for(category catlist:listcategory){ for(category cat:selectedcategorysset){ if(cat.getcategoryid() == catlist.getcategoryid()){ tmplist.add(catlist); } } } listcategory.removeall(tmplist); /* 2 multiple select boxes switches items between each other */ ichoicerenderer<category> renderer = new choicerenderer<category>("title","categoryid"); final palette<category> palette = new palette<category>("palette", new listmodel<category>(selectedcats), new collectionmodel<category>(listcategory), renderer, 10, false);

i debugged code, works selected values empty.

here image of debugged variables:

but selected field still empty!

what doing wrong?

you should not delete every category whole list selected.

palette component must store whole list of values in it's choicesmodel listcategory in code.

so, remove next code implementation:

class="lang-java prettyprint-override">for(category catlist:listcategory){ for(category cat:selectedcategorysset){ if(cat.getcategoryid() == catlist.getcategoryid()){ tmplist.add(catlist); } } } listcategory.removeall(tmplist);

java wicket

java - Wicket/Hibernate: get duplicated records in list from db -



java - Wicket/Hibernate: get duplicated records in list from db -

i´m using wicket , hibernate. got 2 objects category , group. group can have several categorys , category can have several groups.

my problem (its pretty hard me explain in english): seems in list database equal objects size of categorys store grouping (while in database 1 group).

example:

categorys 1, 2, 3, 4

group test

test got category 1 , 2. in panel grouping test shows twice. if add together category 3 grouping test been showed 3 times.

this how info of database:

public list<t> getall( class theclass) { list<t> entity = null; transaction trns = null; session session = sessionfactory.opensession(); seek { trns = session.begintransaction(); entity = session.createcriteria(theclass).list(); session.gettransaction().commit(); } grab (runtimeexception e) { e.printstacktrace(); }finally { session.flush(); session.close(); } homecoming entity; }

inside panel list of groups this:

list<group> grouplist = new arraylist<group>(); grouplist = groupdao.getall(group.class);

if debug through panel , hold on @ page in grouplist same object equal size of categorys stored group. within database still 1 row.

group entity:

@entity @table(name = "group_user") public class grouping implements serializable{ @id @generatedvalue @column(name = "group_id") private int groupid; @manytomany(cascade = {cascadetype.merge}, fetch = fetchtype.eager) @jointable(name="group_to_category", joincolumns={@joincolumn(name="group_id")}, inversejoincolumns={@joincolumn(name="category_id")}) private set<category> categorys = new hashset<category>(); //constructor.. getter , setter.. }

category entity:

@entity @table(name = "category") public class category implements serializable{ @id @generatedvalue @column(name = "category_id") private int categoryid; @manytomany(mappedby="categorys", fetch = fetchtype.eager) private set<group> groups = new hashset<group>(); //constructor.. getter , setter.. }

this caused utilize of eager fetching, bad thought anyway.

you should seek alter mapping lazy fetching of collections if @ possible. solve issue , new issues introduces can improve handled other means such "open session in view". can see give-and-take of in this question.

if have fetch must done eagerly, however, can right issue using resulttransformer consolidates duplicates follows:

public list<t> getall( class theclass) { list<t> entity = null; transaction trns = null; session session = sessionfactory.opensession(); seek { trns = session.begintransaction(); criteria criteria = session.createcriteria(theclass); criteria.setresulttransformer(criteria.distinct_root_entity) entity = criteria.list(); session.gettransaction().commit(); } grab (runtimeexception e) { e.printstacktrace(); }finally { session.flush(); session.close(); } homecoming entity; }

java hibernate wicket

html - Drop Down Menu Categories / Sub Categories -



html - Drop Down Menu Categories / Sub Categories -

what trying have drop downwards menu divided. in illustration there 5 options how can split drop downwards categories? illustration alternative 1 , 2 pop out of environment category , alternative 3 , 4 sports category , 5 college category? http://jsfiddle.net/fc3550sk/

for example:

drop down: please select when click menus environment, sports, colleges.. hover on environment , allow take alternative 1 or 2... or hover on sports , allow chose 3 or 4 , on..

this have far:

<select name="special" id="special"> <option>please select</div> <option data-img="/images/img/animalfriend.png" value="1">animalfriend</option> <option data-img="/images/img/aquaculture.png" value="2">aquaculture</option> <option data-img="/images/img/protectouroceans.png" value="3">protect our oceans</option> <option data-img="/images/img/conservewildlife.png" value="4">conserve wildlife</option> </select> <!-- modal --> <div class="modal fade" id="modal_special" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">close</span></button> <h4 class="modal-title" id="mymodallabel">specialty plate</h4> </div> <div class="modal-body"> ... </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">cancel</button> <button type="button" class="btn btn-primary accept">accept</button> </div> </div> </div> </div>

$(function() { $('#special').on('change', function() { if ($('option:selected', this).is('[data-img]')) { $('#modal_special').find('.modal-body').html('<p>image go here:</p>') .append('<img alt="coming soon" src="' + $('option:selected', this).data('img') + '"/>') .end().modal('show'); } }); $('.accept').on('click',function() { //do $('#modal_special').modal('hide'); }); });

any help appreciated!!

i don't know of way attach "hover" event listener standard drop-down menu, it's not much work implement own custom drop-down jquery, html , css.

custom drop-down advantage #01

you assign many custom values each entry want.

in example, have "specialty plates", , may want assign price, special code assigned plate, image assigned plate, , on. html/jquery version, can create custom drop-downs simple <span> tags this:

<span data-code="sprt01" data-image="" data-price="34.00">sports 01</span> <span data-code="sprt02" data-image="" data-price="35.00">sports 02</span> <span data-code="sprt03" data-image="" data-price="36.00">sports 03</span>

notice how each entry has 3 custom values assigned it: data-code, data-image, , data-price. if utilize html drop-down, don't have much freedom. there ways extend values associated standard drop-down, getting @ values messy, , still not have access hover behavior features require.

custom drop-down advantage #02

you can utilize hover behavior in way want.

in example, want "submenus" show when values in drop-down selected, far know, there isn't way gain access values "hovered" in standard drop-down, , looking html-only solution doesn't exist, have utilize javascript in 1 way or another.

using jquery, can values in custom drop-down elements this:

$("span").hover( function(){ var text = $(this).text(); console.log("you have hovered on: ", text); }, function(){ // have hovered off span } );

my solution problem

putting these ideas practice, set simple demo of how can create custom drop-down using applications parameters.

you can review jsfiddle of demo here.

the basic thought create hierarchy in html construction of top-level options (environment, sports, colleges) in div .drop_down_scroll_container, , place sub-level divs (environment 01, environment 02, etc) below div in div classed .dropdown-subcategory. magic happens, javascript looks index of top-level option, , reveals dropdown-subcategory same index.

for example, in next snippet of html, can see index positions of each of spans within drop_down_scroll_container div:

<div class="drop_down_scroll_container"> <span>environment</span> <!-- index 0 --> <span>sports</span> <!-- index 1 --> <span>colleges</span> <!-- index 2 --> </div>

so then, when hover on of top-level options (environment, sports, colleges) can inquire jquery reveal corresponding submenu div, sitting below .drop_down_scroll_container div in div containers class of .dropdown-subcategory

<div id="dropdown" class="specialtyplatescategories"> <div class="selectheader">click select plates:</div> <!-- set top-level options --> <div class="drop_down_scroll_container"> <span>environment</span> <span>sports</span> <span>colleges</span> </div> <!-- div @ index 0 of: #dropdown.dropdown-subcategory --> <!-- fade in when drop_down_scroll_container index 0 hovered --> <div id="env_subcategories" class="dropdown-subcategory"> <span data-code="env01" data-image="" data-price="31.00">environment 01</span> <span data-code="env02" data-image="" data-price="32.00">environment 02</span> <span data-code="env03" data-image="" data-price="33.00">environment 03</span> </div> <!-- div @ index 1 of: #dropdown.dropdown-subcategory --> <!-- fade in when drop_down_scroll_container index 1 hovered --> <div id="sports_subcategories" class="dropdown-subcategory"> <span data-code="sprt01" data-image="" data-price="34.00">sports 01</span> <span data-code="sprt02" data-image="" data-price="35.00">sports 02</span> <span data-code="sprt03" data-image="" data-price="36.00">sports 03</span> </div> <!-- div @ index 2 of: #dropdown.dropdown-subcategory --> <!-- fade in when drop_down_scroll_container index 2 hovered --> <div id="colleges_subcategories" class="dropdown-subcategory"> <span data-code="coll01" data-image="" data-price="37.00">colleges 01</span> <span data-code="coll02" data-image="" data-price="38.00">colleges 02</span> <span data-code="coll03" data-image="" data-price="39.00">colleges 03</span> </div> </div>

if none of made sense, here way of looking at:

when first item in .drop_down_scroll_container hovered, jquery looks first instance of .dropdown-subcategory below it. when sec item in .drop_down_scroll_container hovered, jquery reveal sec instance of .dropdown-subcategory, , on. lets build many options want, without having worry giving specific names, order matters in case. when "environment" alternative (who's index equals 0) hovered, .dropdown-subcategory index of 0 show. basic idea.

so jquery puts together:

$(document).ready(function(){ // when header custom drop-down clicked $(".selectheader").click(function() { // cache actual dropdown scroll container var dropdown = $(this).parent().find(".drop_down_scroll_container"); // toggle visibility on click if (dropdown.is(":visible")) { dropdown.slideup(); $(this).parent().find(".dropdown-subcategory").fadeout(); } else { dropdown.slidedown(); } }); // when top-level menu item hovered, decide if // coorespnding submenu should visible or hidden $(".drop_down_scroll_container span").hover( // hover on function() { // remove "highlighted class other options $(this).parent().find("span").removeclass("highlighted").removeclass("selected"); $(this).addclass("highlighted").addclass("selected"); // index of hovered span var index = $(this).index(); // utilize hovered index reveal // dropdown-subcategory of same index var subcategorydiv = $(this).parent().parent().find(".dropdown-subcategory").eq(index); hideallsubmenusexceptmenuatindex($(this).parent().parent(), index); subcategorydiv.slidedown(); }, // hover off function() { if (!$(this).hasclass("highlighted")) { var index = $(this).index(); var subcategorydiv = $(this).parent().parent().find(".dropdown-subcategory").eq(index); subcategorydiv.slideup(); } }); // hide submenu items except submenu item @ _index // hide of opened submenu items function hideallsubmenusexceptmenuatindex(formelement, _index) { formelement.find(".dropdown-subcategory").each( function(index) { if (_index != index) { $(this).hide(); } } ); } // when menu item hovered $("span").hover( function() { $(".hoveredover").text($(this).text()); }, function() { $(".hoveredover").text(""); } ); // when sub-menu alternative clicked $(".dropdown-subcategory span").click(function() { $(".dropdown-subcategory span").removeclass("selected"); $(".clickedoption").text($(this).text()); $(this).addclass("selected"); $(this).parent().parent().find(".selectheader").text($(this).text()); closedropdown($(this).parent().parent()); showspecialplatemodal($(this).text(), $(this).attr("data-image"), $(this).attr("data-price"), $(this).attr("data-code")); }); // close dropdowns contained in divtosearch function closedropdown(divtosearch) { divtosearch.find(".drop_down_scroll_container").fadeout(); divtosearch.find(".dropdown-subcategory").fadeout(); }; // populate , launch bootstrap modal dialog specialty plates function showspecialplatemodal(name, image, price, code) { $('#modal_special').find('.modal-body') .html('<h2>' + name + '</h2>') .append('<br/>special plate code: <span class="code">' + code + '</span><br/>') .append('<p>image go here:</p><br/><img alt="" src="' + image + '"/>') .append('<br/><br/>price: <span class="price">' + cost + '</span><br/>') .end().modal('show'); } // when modal "accept" button pressed $('.accept').on('click', function() { var modal_element = $('#modal_special'); var name = modal_element.find("h2").text(); var cost = modal_element.find("span.price").text(); var code = modal_element.find("span.code").text(); $('#modal_special').modal('hide').end(alert(name + " selected cost of " + price)); }); });

note: there may open-source solutions take care of problem in more elegant fashion. approach @ solving issue this. can see, takes little bit of setup going. can command styling of drop-down in css, , can extend want.

again, can review jsfiddle see of code in action here.

hope helps!

html css twitter-bootstrap

angularjs - How to bind properties to input fields from selectoin box selection -



angularjs - How to bind properties to input fields from selectoin box selection -

can't figure out how bind properties of object select box. plunker

<select ng-model="currentemployee.firstname" ng-options="employee.employeeid employee.firstname employee in employees" ng-change="change(employee)"> <option value="">-- select employee</option> </select> <input type="text" ng-model="currentemployee.lastname" /> $scope.change = function(employee) { $scope.currentemployee.firstname = employee.firstname; $scope.currentemployee.lastname = employee.lastname; };

for case don't need utilize ng-change.

set ng-model actual employee object , bind $scope.currentemployee.

<select ng-model="currentemployee" ng-options="employee.firstname employee in employees"> <option value="">-- select employee</option> </select>

then, bind currentemployee <input>:

<input type="text" ng-model="currentemployee.lastname" />

oh, , if want "-- select employee" appear first, set $scope.currentemployee = ""; in controller.

here's modified plunker

angularjs

Drupal 7 - how can I control content layout in a view? -



Drupal 7 - how can I control content layout in a view? -

i've been handed design spec requires news listing in specific format - e.g. image floating left, main title , content on right.

i've created articles listing using views module , embedded view block on front end page. however, need alter layout of resulting list of items @ html level, items not provided in order or within html tags need in order deliver design.

in order style output, need views module give me fine-grained command on html tags beingness wrapped around each field each article.

is possible in drupal?

(edit: please note, not css question - know how float , position things in css. need able modify html tags applied fields in view - thanks!)

when go view, see format. can alter format html list corresponding settings. under show, fields. in fields area, take content want enabled. allow me know if helps, or if want more of explanation. go view , click on field. next window pops should configure field. you'll see style settings can define html tags, classes, wrappers, etc.

drupal-7 drupal-fields

c# - serial port split data -



c# - serial port split data -

in code send resume , left reason text split this:

[com6] pause [com6] re [com6] sume [com6] [com6] le [com6] ft

here code

var myserialport = new serialport { baudrate = int.parse(nscombobox1.items[nscombobox1.selectedindex].tostring()), portname = nscombobox2.items[nscombobox2.selectedindex].tostring(), readtimeout = 500, readbuffersize = 1024, parity = parity.space, stopbits = stopbits.one }; myserialport.open(); myserialport.datareceived += (o, args) => { string s = myserialport.readexisting(); textbox1.invoke( new methodinvoker(() => textbox1.text += string.format("[{0}] {1}", myserialport.portname, s) + environment.newline)); //removed rest beingness irrelevant };

i think because of alternative how can avoid splitting text?

try using myserialport.readline(); read until new line value

c# serial-port

oop - fortran user defined type not found when type name overloaded as the constructor -



oop - fortran user defined type not found when type name overloaded as the constructor -

i wrote codes in file this

module modulebasicgeometry4 ... type tpoint ... end type tpoint interface tpoint module procedure :: tpointinit1,tpointinit2 end interface tpoint contains ... end module modulebasicgeometry4

in file, want utilize user-defined derived type tpoint. used utilize statement:

... utilize modulebasicgeomentry4 type(tpoint) :: ... ...

however, when compile these files ifort2013_sp1.3.174, told me tpoint not derived type name, , if deleted interface statement in first file, ok. seems interface statement masks type statement since have same name. more weirdly, aslo defined many other derived types , corresponding interfaces constructors in same first file, , work ok. leads odd problem?

p.s. think found causes don't know why. not true said other types work ok. in sec file, since need procedure pointers, wrote

... interface ... function ... utilize moudlebasicgeometry4 ... end function ... end interface ...

i found types used before interface statement work well. long types defined in first file used after interface statement, ifort compiler give error message: "this not derived type name." what's more , if delete utilize modulebasicgeometry4 statement in above interface statement, evetything ok. explain why , tell me how solve problem? many thanks.

from fortran 2003 con utilize (inside interfaces) import statement importing entities accessible outside interface, way can substitute use statement seems problematic in case

i tried reproduce code , next compiles correctly gfortran-4.8.

module:

module modulebasicgeomentry4 implicit none type tpoint integer :: integer :: b end type tpoint interface tpoint module procedure :: tpointinit1,tpointinit2 end interface tpoint contains function tpointinit1(a) result(point) integer, intent(in) :: type(tpoint) :: point point%a = point%b = end function function tpointinit2(a,b) result(point) integer, intent(in) :: a,b type(tpoint) :: point point%a = point%b = b end function end module modulebasicgeomentry4

main:

program main utilize modulebasicgeomentry4, : tpoint implicit none type(tpoint) :: point1 interface integer function foo(point) import tpoint type(tpoint) :: point end function end interface type(tpoint) :: point2 point1 = tpoint(1) point2 = tpoint(1,2) print*, foo(point1) print*, foo(point2) end programme main integer function foo(point) utilize modulebasicgeomentry4 , : tpoint type(tpoint) :: point foo = point%a + point%b end function

oop constructor fortran

mstest - How to integrate Visual Studio Coded UI Tests with Jenkins? -



mstest - How to integrate Visual Studio Coded UI Tests with Jenkins? -

i grateful if help me next situation: have started our first automated ui tests codeduitest module visual studio 2012. want run these tests jenkins service utilize run our ui tests. i've read need jenkins mstest plugin , have install visual studio 2012 test agent. farther steps , configuration need do? help.

jenkins mstest coded-ui-tests

sql server 2014 - Where is SQL Analyzer/Profiler -



sql server 2014 - Where is SQL Analyzer/Profiler -

i haven't used sql server in many years , installed sql server 2014 standard edition on windows 8 development machine today. i'm unable find sql analyzer tool other posts seems have been renamed profiler. word should search on find application (windows search) or there simpler way find it?

i'm not sure if matters, started off express edition of of 2012, couldn't find tools either , upgraded 2014 standard edition.

thanks in advance.

you need install sql server install includes sql server management studio. advanced pack contains including total text indexing if remember. if you've installed standard edition might have - sql server management studio in apps. if not can download separately.

sql-server-2014

javascript - dojo/cbtree: Checkboxes states for lazy loading mode -



javascript - dojo/cbtree: Checkboxes states for lazy loading mode -

i initialize cbtree lazy loading filestoremodel has parameter: checkedstrict: false. info source utilize filestore. in case, state of nested checkboxes don't impact parental nodes. likewise state of parental checkboxes don't impact nested checkboxes. if checkedstrict have true value cbtree pull nodes , leaves. process may long.

how enable strict check lazy loading mode without pulling nested nodes?

this functionality unavailable current implementation - described here

javascript dojo

ios - Re-show rightBarButtonItem that relies on mapbox mapView? -



ios - Re-show rightBarButtonItem that relies on mapbox mapView? -

my application tab-based. on 1 tab map (which using mapbox for.) when click on tab, puts trackingbarbutton item on top right of navigationcontroller top bar. when clicked, button interacts mapview show user's location. issue having when go tab (besides map), need remove trackingbarbutton top right, not apply of other tabs.

here how mapview , tracking bar button initialized

- (void)viewdidload { [super viewdidload]; rmmbtilessource *offlinesource = [[rmmbtilessource alloc] initwithtilesetresource:@"example-map" oftype:@"mbtiles"]; rmmapview *mapview = [[rmmapview alloc] initwithframe:self.view.bounds andtilesource:offlinesource]; //initalize button in top-right self.tabbarcontroller.navigationitem.rightbarbuttonitem = [[rmusertrackingbarbuttonitem alloc] initwithmapview:mapview]; }

here hide button

- (void)viewwilldisappear:(bool)animated self.tabbarcontroller.navigationitem.rightbarbuttonitem = nil; }

now normally, re-initialize button in viewwillappear(), issue need utilize mapview object initialized in viewdidload(). have ideas on how can re-use object or hide rightbarbuttonitem rather deleting completely? prefer not re-initialized mapview each time.

thanks!

have tried modifying navigationitem of uiviewcontroller instead of uitabbarcontroller. way, rightbarbuttonitem should show when view controller shown , hide automatically when new uiviewcontroller shows own navigationitem. although i'm not 100% sure this.

- (void)viewdidload { ... //initalize button in top-right self.navigationitem.rightbarbuttonitem = [[rmusertrackingbarbuttonitem alloc] initwithmapview:mapview]; }

ios objective-c mapbox

Generating text box in php and codeigniter -



Generating text box in php and codeigniter -

i want dynamically generate row of text boxes in table when clicking button.for illustration have table come in list items.when click add together button, new row inserted table.can please help me.i working on php , codeigniter..

the foolowing script have used generating row.

<script language="javascript"> function changeit() { var = 1; my_div.innerhtml = my_div.innerhtml +"<br><input type='text' name='mytext'+ i>" i++; } </script> <table align="center" name="table"> <tr> <td>code</td> <td>name</td> <td>quantity</td> <td>price</td> <input type="button" value="add" onclick="changeit()"/> </tr> </table> <div id="my_div"> <table> <tr> <td></td> </tr> </table>

this generates 1 text box @ time. need display more 1 text box in row?

try (new code)

<script language="javascript"> var = 1; function changeit() { var my_div = document.getelementbyid("my_div"); var row = "<tr> <td> <input type='text' name='mycode_"+i+"'></td><td><input type='text' name='myname_"+i+"'></td><td><input type='text' name='myquantity_"+i+"'></td> <td><input type='text' name='myprice_"+i+"'></td> </tr>"; my_div.innerhtml = my_div.innerhtml +row; i++; } </script> <table align="center" name="table" id="my_div" border="2"> <tr> <td>code</td> <td>name</td> <td>quantity</td> <td>price</td> <input type="button" value="add" onclick="changeit()"/> </tr> </table>

php codeigniter

memory - c++ get address of variable without operator& -



memory - c++ get address of variable without operator& -

i have got class has overloaded unary operator&. objects of type created using new, address of variable accessible need utilize static object. possible address?

since c++11, may utilize function std::addressof

c++ memory memory-management addressof

visual c++ - how can i execute a file kept on desktop in c++? -



visual c++ - how can i execute a file kept on desktop in c++? -

my file construction executing .exe c:\documents , settings\desktop\release\abc.exe want execute other c++ programme in vb c++ after building, generates error c:\document not external or internal command few lines of code follows:

#include<stdlib.h> #include<stdio.h> int main( void ) { int result; result=system("c:\\documents , settings\\desktop\\release\\abc.exe"); getchar(); homecoming 0; }

as suspected when writing before comment, way wrap entire string in double-quotes. 'escaping spaces' sounds non-sensical me. 25 seconds of googling , don't see (nor have heard of in on 20 years) escape-sequence space character in c.

the solution indeed include quotes in string - not wrap string in single pair of them, you've done. next trick:

#include <stdlib.h> #include <stdio.h> int main() { int result; result = system("\"c:\\documents , settings\\desktop\\release\\abc.exe\""); getchar(); homecoming 0; }

however, said - shouldn't using system phone call job. since you're on windows machine, should utilize shellexecute function instead. there many reasons this, wont go here, can them yourself. suffice it's infinitely improve way invoke program.

more on shellexecute: http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx

c++ visual-c++

javascript - Downloading a file in MVC app using AngularJS and $http.post -



javascript - Downloading a file in MVC app using AngularJS and $http.post -

any help welcomed , appreciated.

i have mvc action retries file content web service. action invoked angular service (located in services.js) using $http.post(action, model), , action returning filecontentresult object, contains byte array , content type.

public actionresult downloadresults(downloadresultsmodel downloadresultsmodel) { downloadresult = ... // retrieving file web service response.clearheaders(); response.addheader("content-disposition", string.format("attachment; filename={0}", downloadresult.filename)); response.bufferoutput = false; homecoming new filecontentresult(downloadresult.contents, downloadresult.contenttype); }

the issue i'm having browser not performing default behavior of handing file (for example, prompting open it, saving or cancel). action completed having content of file , file name (injected filecontentresult object), there s no response browser.

when i'm replacing post $window.location.href, , build uri myself, i'm hitting action , after completes browser handling file expected.

does can think of thought how finish 'post' expected?

thanks,

elad

i using below code download file, given file exist on server , client sending server total path of file...

as per requirement alter code specify path on server itself.

[httpget] public httpresponsemessage downloadfile(string filename) { filename = filename.replace("\\\\", "\\").replace("'", "").replace("\"", ""); if (!char.isletter(filename[0])) { filename = filename.substring(2); } var fileinfo = new fileinfo(filename); if (!fileinfo.exists) { throw new filenotfoundexception(fileinfo.name); } seek { var exceldata = file.readallbytes(filename); var result = new httpresponsemessage(httpstatuscode.ok); var stream = new memorystream(exceldata); result.content = new streamcontent(stream); result.content.headers.contenttype = new mediatypeheadervalue("application/octet-stream"); result.content.headers.contentdisposition = new contentdispositionheadervalue("attachment") { filename = fileinfo.name }; homecoming result; } grab (exception ex) { homecoming request.createresponse(httpstatuscode.expectationfailed, ex); } }

and on client side in angular:

var downloadfile = function (filename) { var ifr = document.createelement('iframe'); ifr.style.display = 'none'; document.body.appendchild(ifr); ifr.src = document.location.pathname + "api/gridapi/downloadfile?filename='" + escape(filename) + "'"; ifr.onload = function () { document.body.removechild(ifr); ifr = null; }; };

javascript asp.net-mvc angularjs asp.net-mvc-4 download

Can the SharePoint object model setup data retention on an item? -



Can the SharePoint object model setup data retention on an item? -

ootb settings allow info policy on document library or content type. need extent farm solution have different expiration polices on each individual document.

any help appreciated.

to farther elaborate, request allow info retention (1 month, 3 months, 6 months) items in 1 document library. separate document libraries have been used, when comes reports, have been more unnecessary coding compensate separate libraries. if 1 document set 1 month, needs moved recycle bin, other items remain based on retention. single info policy @ library level not work.

instead of trying set info retention on item itself, info policies setup on content types. content type 1 month, 1 3 months , 6 months. using object model, item contenttypeid can assigned respected content type.

sharepoint sharepoint-2010 sharepoint-2007 sharepoint-2013

java - How to iterate through an ArrayList and only pull out 1 field from each object -



java - How to iterate through an ArrayList and only pull out 1 field from each object -

i working on jlist issue. have array list of objects have 3 fields each. want set lastname, firstname in jlist can figure out how pull lastly objects info out of arraylist.

any help appreciated. thanks

import java.awt.eventqueue; import java.lang.reflect.array; import java.util.arraylist; import java.util.list; import javax.swing.jframe; import javax.swing.jlist; import javax.swing.listmodel; import javax.swing.listselectionmodel; import javax.swing.abstractlistmodel; public class testinglistsgui { private jframe frame; string[] values; /** * launch application. */ public static void main(string[] args) { eventqueue.invokelater(new runnable() { public void run() { seek { testinglistsgui window = new testinglistsgui(); window.frame.setvisible(true); } grab (exception e) { e.printstacktrace(); } } }); } /** * create application. */ public testinglistsgui() { initialize(); } /** * initialize contents of frame. */ private void initialize() { frame = new jframe(); frame.setbounds(100, 100, 450, 300); frame.setdefaultcloseoperation(jframe.exit_on_close); frame.getcontentpane().setlayout(null); // create array list , populate generic info testing final list<jliststesting> mylist = new arraylist<jliststesting>(); mylist.add(new jliststesting("bruce", "james", "totally awesome")); mylist.add(new jliststesting("potter", "harry", "a magician")); mylist.add(new jliststesting("sanders", "col", "the chicken meister")); mylist.add(new jliststesting("bond", "james", "licensed kill")); values = new string[mylist.size()]; (int = 0; < mylist.size(); i++) { values[i] = jliststesting.getfirstname(); } jlist list = new jlist(); list.setmodel(new abstractlistmodel() { public int getsize() { homecoming values.length; } public object getelementat(int index) { homecoming values[index]; } }); list.setselectedindex(0); list.setselectionmode(listselectionmodel.single_selection); list.setbounds(33, 23, 236, 249); frame.getcontentpane().add(list); } }

don't utilize null layoutmanager. read next tutorial.

for filling values utilize next code:

for (int = 0; < mylist.size(); i++) { values[i] = mylist.get(i).getfirstname(); }

you need't custom model jlist create jlist values constructor:

jlist<string> list = new jlist<string>(values);

also read jlist tutorial

java swing arraylist iterator jlist

indexing - Unable to import/link table from SQL Server into access. Too many indexes error -



indexing - Unable to import/link table from SQL Server into access. Too many indexes error -

i trying import table sql access getting many indexes in table error. table in sql indexed several tables , unfortunately don't have rights modify or alter table anyway. have read access in db. trying import/link table unable due many indexes error beingness thrown.

is possible import/link info , not indexes? know access has limit of 32 indexes. have cleared auto indexes in options too, still error.

is there solution how can import/link table in access?

thanks in advance

i did digging on how avoid problem. problem can't straight link sql database if table has lot of indexes , access throw error "too many indexes on table trying import".

one way beat putting "pass-through query". lot of people suggested vba code. not coder , not work effectively. however, access gives capability build out vba , solution found in microsoft website.

the steps follows: might have work around 2010 due different naming convention when compared 2007.

on create tab, click query design in other group. click close in show table dialog box without adding tables or queries. save query. open query in design mode on design tab, click pass-through in query type workgroup. click property sheet in show/hide workgroup display property sheet query. in query property sheet, place mouse pointer in odbc connect str property, , then, click build (...) button.

with odbc connect str property, specify info database want connect. can type connection information, or click build, , come in info server connecting.

when prompted save password in connection string, click yes if want password , logon name stored in connection string information. if query not type returns records, set returnsrecords property no. in sql pass-through query window, type pass-through query. example, next pass-through query uses microsoft sql server top operator in select statement homecoming first 25 orders in orders table sample northwind database: select top 25 orderid orders

to run query, click run in results grouping on design tab. sql pass-through query returns records, click datasheet view on status bar. if necessary, microsoft access prompts info server database.

this worked me. if 1 having same problem can utilize these steps.

indexing ms-access-2010 importerror

jquery - Dropdown change event calling on pageload instead of actual click change -



jquery - Dropdown change event calling on pageload instead of actual click change -

i have need post info server , ajax phone call when of multiple(1 many) dropdowns changed on page user. problem when dropdowns populated on page load think firing alter event in jquery. because getting null error page mentioning ajaxupdateattendance server before page finishes loading.

this dropdown looks like:

@html.dropdownlistfor(function(m) m(i).completed_class, new selectlist(viewbag._status), new {.data_regid = currentitem.staff_id, .data_isstaff = "true", .data_courseref = currentitem.course_ref, .class = "attenddrop", .data_url = html.action("ajaxupdateattendance", "admin")})

jquery

$(function(){ $(".attenddrop").on("change keyup").change(function () { var isstaff = $(this).attr('data-isstaff'); if (isstaff) { var classid = $(this).attr('data-courseref'); var regid = $(this).attr('data-regid'); var url = $(this).attr("data-url"); var sval = $(this).val(); $.ajax({ url: url, data: {isstaff: isstaff, regid: regid, classid: classid, sval: sval}, success: function (data) { console.log(data.message); } }); }); });

technically you're rendering select , "changing" value setting value database (or default value). check in javascript before making call, didnt variables couldnt null, i'm assuming data-regid below sake of example:

$(function(){ $(".attenddrop").on("change keyup").change(function () { var isstaff = $(this).attr('data-isstaff'); if (isstaff) { var classid = $(this).attr('data-courseref'); var regid = $(this).attr('data-regid'); var url = $(this).attr("data-url"); var sval = $(this).val(); if (regid != null) { $.ajax({ url: url, data: {isstaff: isstaff, regid: regid, classid: classid, sval: sval}, success: function (data) { console.log(data.message); } }); } }); });

also, 1 of perks of using info attributes jquery can use

$(this).data('courseref') when info attribute "data-course-ref"

you can set var like:

var dataatts = $(this).data();

and utilize object so: dataatts.courseref, dataatts.regid, etc. dont quote syntax on that.. off bit :-)

jquery

for-generate inside process vhdl -



for-generate inside process vhdl -

i know not possible write for-generate within process want accomplish functionality presented code.it address decoder. help appreciated.

the next code gives syntax error : "syntax error near generate"

library ieee; utilize ieee.std_logic_1164.all; utilize ieee.numeric_std.all; entity address_decoder generic (cam_depth: integer := 8); port (in_address: in std_logic_vector(cam_depth-1 downto 0); out_address: out std_logic_vector(2**cam_depth-1 downto 0); clk : in std_logic; rst: in std_logic ); end address_decoder; architecture behavioral of address_decoder begin decode_process: process(clk,rst) begin if(clk'event , clk='1') if (rst = '1') out_address <= (others => '0'); else name: in 0 10 generate if (i = to_integer(unsigned(in_address))) out_address(i) <= '1'; else out_address(i) <= '0'; end if; end generate name; end if; end if; end process; end behavioral;

your decoder binary one-hot encoder downstream register. can extract encoder , set function

function bin2onehot(value : std_logic_vector) homecoming std_logic_vector variable result : std_logic_vector(2**value'length - 1 downto 0) := (others => '0'); begin result(2 ** to_integer(unsigned(value))) := '1'; homecoming result; end function;

and register:

process(clk) begin if rising_edge(clk) if (rst = '1') out_address <= (others => '0'); else out_address <= bin2onehot(in_address); end if; end if; end process;

you can spare rst sensitivity list, because it's synchronous reset.

vhdl

yii - Yii1/Yii2: How to organize code in web application? -



yii - Yii1/Yii2: How to organize code in web application? -

when should utilize applications, when modules or when should utilize controllers? i'm not sure how split code these components , don't know when utilize what. can provide strategies or best practices? or practices regarded coding horror?

i assume extensions intended published or shared. these type of items not relevant question.

i know: it depends. there might advises not depend much on application , can given in general. or there advises like: if application kind of that.

what think when rbac comes play, restful apis or ajax-related stuff? or other things.

the yii2 definitive guide, "application structure" section provides application organization information: → http://www.yiiframework.com/doc-2.0/guide-structure-overview.html

entry scripts, controllers, models, views, modules, filters, widgets, assets , extensions covered. "best practices" can found in several of "application structure" subsections.

rbac covered in yii2 guide security section. restful apis has it's own yii2 guide section. asynchronous js placed in assets bundle or registered view registerjs() or registerjsfile(). → http://www.yiiframework.com/doc-2.0/guide-readme.html

rbac, restful apis , ajax fit within yii2 "application structure" organization.

web-applications yii directory-structure yii2 yii-modules

add fragment to popup window in android -



add fragment to popup window in android -

my problem want add together fragment pop window display info when list clicked. list contains custom adapter. below want :-

when list item clicked, model adapterview , pass jobsearchmodel. jobsearchmodel contains info want display on jobdescription fragement. don't know how add together fragement pop window.

searchresult.setonitemclicklistener(new adapterview.onitemclicklistener() { @override public void onitemclick(adapterview<?> adapterview, view view, int i, long l) { jobsearchmodel jobs = (jobsearchmodel) adapterview.getitematposition(i); jobdescription jobdescription = new jobdescription(); bundle args = new bundle(); args.putserializable("jobs", jobs); jobdescription.setarguments(args); popupwindow.showatlocation(jobdescription, gravity.center, 0, 0); } });

copied here

the next should work perfect in accordance specification. phone call method within onclick(view v) of onclicklistener assigned view:

public void showpopup(view anchorview) { view popupview = getlayoutinflater().inflate(r.layout.popup_layout, null); popupwindow popupwindow = new popupwindow(popupview, layoutparams.wrap_content, layoutparams.wrap_content); // example: if have textview within `popup_layout.xml` textview tv = (textview) popupview.findviewbyid(r.id.tv); tv.settext(....); // initialize more widgets `popup_layout.xml` .... .... // if popupwindow should focusable popupwindow.setfocusable(true); // if need popupwindow dismiss when when touched outside popupwindow.setbackgrounddrawable(new colordrawable()); int location[] = new int[2]; // view's(the 1 clicked in fragment) location anchorview.getlocationonscreen(location); // using location, popupwindow displayed right under anchorview popupwindow.showatlocation(anchorview, gravity.no_gravity, location[0], location[1] + anchorview.getheight()); }

the comments should explain enough. anchorview v onclick(view v).

android android-layout android-activity android-fragments

google DFA reporting api get report as zip -



google DFA reporting api get report as zip -

i trying download study using google dfa reporting api .net client in zip format getting csv. using mediadownloader class download study url provided report. have enabled gzipenabled property on service not impact response help much appreciated

thanks

the gzipenabled property affects info while in transit. when gzipenabled true, info packets compressed during transmission. upon arrival, info decompressed.

gzipenabled not intended cause compressed file created.

google-api-dotnet-client

c# - How to get first item from XmlSchema.Elements -



c# - How to get first item from XmlSchema.Elements -

i have xmlschema object. has elements property. i need first element it. cant figure how not writing foreach/break (which stupid). there nice way?

edit: way found : getenumerator/movenext/value;

edit2: 1 of ways cast xmlschema.elements.values (icollection) meaningful type utilize linq. problem cant find type. gettype gives me name: "system.xml.schema.xmlschemaobjecttable+valuescollection"

i dont see type in objectexplorer , cant cast it..

please reply if have working solution rather throwing in whatever comes head. thanks.

use linq on names or values of elements, depending on need

e.g.,

var v = yourobject.elements.names.oftype<xmlqualifiedname>().firstordefault(); var w = yourobject.elements.values.oftype<xmlschemaelement>().firstordefault();

===

edited: added oftype<> icollection<> instead of icollection possible utilize firstordefault

note: verified solution on illustration xmlschema http://msdn.microsoft.com/en-us/library/system.xml.schema.xmlschema%28v=vs.110%29.aspx, if element names or values have different type you'll need alter in oftype<>

c# .net xml xsd .net-4.5

c# - how can we rotate an object 360 degree using Quaternion.euler in unity? -



c# - how can we rotate an object 360 degree using Quaternion.euler in unity? -

i working in unity develop tan-gram game. want rotate object 360 degrees, it's not working. want rotate object through web cam. means when rotate real world object, want game object rotate real world object rotates. using marker real world object. rotating above code. not accurate. it's faster real rotation.

void update () { if (nyarwebcam == null) { return; } nyarwebcam.update (); nyarmarker.update (nyarwebcam); bool checkmarker = nyarmarker.isexistmarker (mid); bool checkmarker2 = nyarmarker.isexistmarker (mid2); string s = "", pos = "", p = ""; float firstmarker = 0f, secondmarker = 0f; if (checkmarker) { nyarmarker.getmarkertransform (mid, ref markerposition1, ref markerrotation); if (count1 == 0) { float temp = (markerposition1.z + actualz); applyz1 = (markerposition1.z - temp) + 50; newz1 = temp; count1++; } else { applyz1 = (markerposition1.z - newz1) + 50; } applyx1 = markerposition1.x/2; b.transform.position = vector3.lerp (b.transform.position, new vector3 (-applyx1, 36.98051f, 36.98051f), 0.5f * time.deltatime); float n = 1.0f; n =(float) (markerrotation.x* mathf.rad2deg); debug.log (n); b.transform.rotation = quaternion.euler (n*(n/8), 90, 0); pos = "" + applyz1; firstmarker = applyx1; }

c# unity3d quaternions euler-angles

r - using multcompLetters to add connecting letters -



r - using multcompLetters to add connecting letters -

i hope there has 2 minutes explain me 2 things. have code run on pretty big dataset. using multcompletters add together connecting letters boxplots. have experiment setup 4 treatments , 2 genotypes aov y ~ treat+geno+geno:treat. when run code treatment (3df) or interaction (7df) seems work quite ok time. when run on geno(here x) error.

error in multcompletters(t$x[, 1]) : names required t$x[, 1]

and cant find out why.

2nd question -

what [,4] mean in

groups2 <- multcompletters(t$x[,4])

??

the code mockup made u:

#rgr ~ geno boxplot y<-c(1,2,6,4,5,7,2,3,9,7,5,6,4,3,2,3,4,5,4,5) x<-c("no","yes","no","yes","no","yes","no","yes","no","yes", "no","yes","no","yes","no","yes","no","yes","no","yes") fit <- aov(y~x) summary(fit) t <- tukeyhsd(aov(fit)) t names(t) boxplot(y~x, data=for.r, ylim=c(0,10),xlab="some", ylab="else") tp <- extract_p(t) tp groups2 <- multcompletters(t$x[,4]) lets <- groups2$letters[c(4,1:3)] text(1:4, 95 ,lets)

thanks.

what multcompletters expects matrix of values, because expected more 1 comparison. in data, have 1 comparison, yes vs no. if within t$x variable, can see matrix:

t$x # diff lwr upr p adj # yes-no 0.3 -1.631884 2.231884 0.747998

typically, there many rows here. unfortunately, when select 1 row matrix, of row names dropped, , multcompletters needs names. example:

t$x[,4] # [1] 0.747998 # no names.

to prevent this, have add together parameter subselect:

t$x[,4,drop=false] # p adj # yes-no 0.747998 # names intact multcompletters(t$x[,4,drop=false]) # works. # $letters # yes-no # "a" # # $lettermatrix # # yes-no true

r

javascript - if else can't get the right value to return -



javascript - if else can't get the right value to return -

i using sliding scale value , homecoming input box.

and checking else if status , function homecoming value first time output right ui.value = 10 , 2 time display sliding scale value

how check status ?

$("#sliders #slider-range-min").slider({ range: "min", value: 0, min: 0, max: 5500, slide: function(event, ui) { if (ui.value >= '1' && ui.value <= '1000' ) { ui.value = 10; } else if (ui.value >= '10001' && ui.value <= '24999' ) { ui.value = 25; //console.log(ui.value); } else if (ui.value >= '25000' && ui.value <= '54999' ) { ui.value = 50; } else if (ui.value >= '55000') { ui.value = 100; } console.log(ui.value); homecoming $("#sliders #amount3").val("$" + ui.value); } });

here got solution...

use next code

$("#sliders #slider-range-min").slider({ range: "min", value: 0, min: 0, max: 5500, slide: function(event, ui) { if (ui.value >= '1' && ui.value <= '1000' ) { ui.value = 10; } //else if (ui.value >= '10001' && ui.value <= '24999' ) { else if (ui.value >= '1001' && ui.value <= '2499' ) { // ui.value = 25; //console.log(ui.value); } //else if (ui.value >= '25000' && ui.value <= '54999' ) { else if (ui.value >= '2500' && ui.value <= '5499' ) { ui.value = 50; } //else if (ui.value >= '55000') { else if (ui.value >= '5500') { ui.value = 100; } console.log(ui.value); homecoming $("#sliders #amount3").val("$" + ui.value); } });

try fiddle fiddle

hope helps.........

javascript jquery if-statement

database - SQL counts of tests given in year -



database - SQL counts of tests given in year -

i'm trying create sum of tests given in year specific table. have far:

select distinct to_char(test_date, 'yyyy') year, sum(yearcount) from( select count(test_date) yearcount test_record ), test_record grouping test_record.test_date order year asc;

which gives me output:

year sum(yearcount) ---- -------------- 1958 12 1991 12 1996 12 1998 12 2000 12 2001 12 2010 12 2012 12 2013 12

now, understand problem lies here: select count(test_date) yearcount , because have 12 entries in table it's giving count of number of entries in table. need count of tests given in each year, i.e. output should this:

year sum(yearcount) ---- -------------- 1958 1 1991 1 1996 1 1998 1 2000 1 2001 1 2010 1 2012 1 2013 4

so question boils downwards to: how count year in date column? (i'm using oracle 7 believe)

edit: below help able desired output, both little "wrong", didn't take them (sorry if that's faux pas). here script:

select to_char(test_date, 'yyyy') year, count(test_date) test_record grouping to_char(test_date, 'yyyy') order year asc;

you want grouping year , not test date.

select count(*), to_date('yyyy',test_data) year test_record grouping to_date('yyyy',test_date)

sql database count sum

android - Searchview Filters for more than one listfragment with custom adapter -



android - Searchview Filters for more than one listfragment with custom adapter -

i using more 1 listfragment activity in project.

i struct in filtering listview.

is possibility add together searchview kid fragment activity.?

how handle type of filteration???

this problem solved adding sethasoptionsmenu(true); code in kid fragment activity extends listfragment.

sethasoptionsmenu(true); mention kid activity has menu options.

android filter fragment android-listfragment searchview

html - use DOMXPath and function query php -



html - use DOMXPath and function query php -

have next html code section:

<ul id="tree"> <li> <a href="">first</a> <ul> <li><a href="">subfirst</a></li> <li><a href="">subsecond</a></li> <li><a href="">subthird</a></li> </ul> </li> <li> <a href="">second</a> <ul> <li><a href="">subfirst</a></li> <li><a href="">subsecond</a></li> <li><a href="">subthird</a></li> </ul> </li> </ul>

need parse html code , next (using domxpath::query() , foreach())

- first -- subfirst -- subsecond -- subthird - sec -- subfirst -- subsecond -- subthird

piece of code:

$xpath = new \domxpath($html); $catgs = $xpath->query('//*[@id="tree"]/li/a'); foreach ($catgs $category) { // first level echo '- ' . mb_strtolower($category->nodevalue) . '<br>'; // sec level // don't know }

thanks in advance!

this domblaze for:

/* domblaze */ $doc->registernodeclass("domelement","domblaze"); class domblaze extends domelement{public function __invoke($expression) {return $this->xpath($expression);} function xpath($expression){$result=(new domxpath($this->ownerdocument))->evaluate($expression,$this);return($result instanceof domnodelist)?new iteratoriterator($result):$result;}} $list = $doc->getelementbyid('tree'); foreach ($list('./li') $item) { echo '- ', $item('string(./a)'), "\n"; foreach ($item('./ul/li') $subitem) { echo '-- ', $subitem('string(./a)'), "\n"; } }

output:

- first -- subfirst -- subsecond -- subthird - sec -- subfirst -- subsecond -- subthird

domblaze fluentdom poor.

php html xpath domdocument

javascript - Convert to Image or use canvas? -



javascript - Convert to Image or use canvas? -

just wondering if improve convert canvas drawing image before adding dom or improve add together canvas itself?

i using canvas create image.

it depends on scenario.

canvas may or may not allocate memory buffer typically shares buffer display buffer. may not case if pixel ratio different 1:1 (ie. retina displays).

also, canvas, if created using html tags, may cleared browser under conditions such window resize. seem lesser problem though used (chrome clear canvas when showing dialogs).

converting image gives performance , memory overhead though: first create compressed image, converting base-64 additional 33% memory overhead, pass in image source triggers converting of base-64 string image file , decompressing bitmap.

javascript html5 canvas

R dataset with $ NULL:'data.frame'? -



R dataset with $ NULL:'data.frame'? -

it may dummy questions i'm stuck here.

i have next dataset in r:

> str(he) list of 1 $ null:'data.frame': 29 obs. of 10 variables: ..$ date : factor w/ 4 levels "","october 15, 2014 4:13 pm",..: 3 1 1 1 1 3 1 1 1 3 ... ..$ receipt : factor w/ 14 levels "","-1 discount",..: 14 3 7 5 2 13 4 8 6 12 ... ..$ register: factor w/ 11 levels "-300.00","-400.00",..: 11 7 4 4 1 11 5 4 4 11 ... ..$ user : factor w/ 4 levels "","cash","credit card",..: 4 1 1 1 1 4 3 1 1 4 ... ..$ customer: factor w/ 4 levels "","1,000.00",..: 1 na na na na 1 2 na na 1 ... ..$ notes : factor w/ 1 level "": 1 na na na na 1 na na na 1 ... ..$ products: factor w/ 1 level "total sale": 1 na na na na 1 na na na 1 ... ..$ total : factor w/ 3 levels "0.00","1,000.00",..: 1 na na na na 2 na na na 3 ... ..$ payments: factor w/ 1 level "total paid": 1 na na na na 1 na na na 1 ... ..$ paid : factor w/ 3 levels "0.00","1,000.00",..: 1 na na na na 2 na na na 3 ...

however, don't seem able access data. instance:

> he$date null

there $ null:'data.frame'. can help? thanks.

your str(he) output says all. list of 1... means data.frame residing within list. best thing either re-assign 'he' data.frame, or create new data.frame reference elements within it. e.g

df_he <- he[[1]] df_he$date

r dataset

Concatenate certain elements from a cell array into a numeric array - MATLAB -



Concatenate certain elements from a cell array into a numeric array - MATLAB -

i have nested cell array a, illustration a 1 x 6 cell.

each cell of a contains array of cells (for ex. a{1} = 1 x n cell).

each cell of a{1}{1} contains other cell arrays a{1}{1} = 1 x n cell

i list content of cell in unique array.

a = cell(1,2); a{1} = cell(1,2); a{2} = cell(1,1); a{1}{1} = [{1} {2}]; a{1}{2} = [{3} {4}]; a{2}{1} = [{5} {6}]; vec = []; = 1 : size(a,2) j = 1 : size(a{1,i},2) vec = [vec; cell2mat(a{1,i}{1,j}(:,2))]; end end vec = [2;4;6]

is there way avoid loop?

thanks

see works -

a_horzcat = horzcat(a{:}) out = cell2mat(vertcat(a_horzcat{:})) vec = out(:,2)

another approach (a one-liner! , better) -

vec = arrayfun(@(x) x{1}{2}, [a{:}]).'

matlab cell-array

javascript - Uncaught SyntaxError: Unexpected string - in my Angular function's return -



javascript - Uncaught SyntaxError: Unexpected string - in my Angular function's return -

no thought why i'm getting error here, i've used exact type of function in other apps before. difference here i'm including within of angular controller, perchance have error?

// controller add together client app.controller('addcustomercontroller', function($scope) { $scope.deactivate_btn = false; // check users: this.checkall = function() { var checkboxes = document.getelementsbyname('checkboxcustomer'); var checkall = document.getelementsbyname('checkboxall'); (var = 0, n = checkboxes.length; < n; i++) { checkboxes[i].checked = checkall[0].checked; } }; function buildaddedsiterow(id, name, address, loc1, loc2, city, state, zip) { id = id || " "; name = name || " "; address = address || " "; loc1 = loc1 || " "; loc2 = loc2 || " "; city = city || " "; state = state || " "; zip = zip || " "; var number = 1 + math.floor(math.random() * 6); homecoming "<tr class='added_sites_tbody'><td><div class='check-label'><input ng-click='deactivate_btn = !deactivate_btn' ng-class='{ active: deactivate_btn }' type='checkbox' name='checkaddsite' id='"+id"' class='css-checkbox' /><label for='"+id"' class='css-label radgroup1 clr'>"+id"</label></div></td><td>"+name"</td><td>"+address"</td><td><div class='add_sites_location'><p>"+loc1"</p> <p>"+loc2"</p></div></td><td>"+city"</td><td>"+state"</td><td>"+zip"</td><td></td></tr>"; }; });

return "<tr class='added_sites_tbody'><td><div class='check-label'><input ng-click='deactivate_btn = !deactivate_btn' ng-class='{ active: deactivate_btn }' type='checkbox' name='checkaddsite' id='"+id"' class='css-checkbox' /><label for='"+id"' class='css-label radgroup1 clr'>"+id"</label></div></td><td>"+name"</td><td>"+address"</td><td><div class='add_sites_location'><p>"+loc1"</p> <p>"+loc2"</p></div></td><td>"+city"</td><td>"+state"</td><td>"+zip"</td><td></td></tr>"; // errors here ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ , ------------------------------------^ , ---------------------------------^ , ------------------------^ , -------------^ , on

you need + in each of locations.

javascript string angularjs return

dns - Link a shared webhosting to an external domain -



dns - Link a shared webhosting to an external domain -

i'm confusing on something!

if map domain 1&1 shedhosting bluehost. means can manage domain bluehost ?

in other words can manage domain 1a1 (emails, subdomains...) bluehost without transferring it.

thanks,

of course of study can. default, domain nameservers utilize registrar nameservers, in case 1&1 service. login 1&1 account, alter domain nameservers bluehost nameservers. can find hosting nameservers in hosting cpanel (i assume bluehost utilize cpanel). or, if find problem finding nameservers, contact bluehost client service.

after alter nameservers, check first create sure changes take effect, utilize http://who.is service. go bluehost cpanel, can manage domain name straight there, add/remove subdomain, alter dns record (a record, cname, etc..) , mail service functioned (i assume bluehost give email hosting service in hosting package).

note: don't need transfer domain bluehost, can have domain registrar different hosting provider. thing need pointing nameservers hosting nameservers. remember: domain record in 1&1 business relationship not functioned, need move bluehost cpanel. record, cname, etc in 1&1 panel must re-written in bluehost cpanel.

i utilize method right now, , ok!

dns shared-hosting domain-name

Trouble loading a dataset in R -



Trouble loading a dataset in R -

i have downloaded bundle semipar , have been trying attach dataset fuel.frame, using command data(fuel.frame), without sucess. error have been getting is:

error in read.table(zfile, header = true, as.is = false) : more columns column names in addition: warning messages: 1: in read.table(zfile, header = true, as.is = false) : line 1 appears contain embedded nulls 2: in read.table(zfile, header = true, as.is = false) : line 5 appears contain embedded nulls 3: in read.table(zfile, header = true, as.is = false) : incomplete final line found readtableheader on 'c:/...

could please tell me wrong here? have tried solutions online seems bundle works besides myself.

my sessioninfo()

attached base of operations packages: [1] stats graphics grdevices utils datasets methods base of operations other attached packages: [1] semipar_1.0-4.1 loaded via namespace (and not attached): [1] cluster_1.15.3 grid_3.1.1 lattice_0.20-29 mass_7.3-33 nlme_3.1-117 [6] tools_3.1.1

thank you.

the "fuel.frame" file in ../semipar/data/ directory wherever library is. can utilize .libpaths() function. me returns:

> .libpaths() [1] "/library/frameworks/r.framework/versions/3.1/resources/library"

if in there should see "fuel.frame.txt.gz" tells it's gzipped file expand text file (which data() phone call doing before passing read.table() ). top of looks like:

car.name weight disp. mileage fuel type "eagle summit 4" 2560 97 33 3.030303 little "ford escort 4" 2345 114 33 3.030303 little "ford festiva 4" 1845 81 37 2.702703 little "honda civic 4" 2260 91 32 3.125000 little "mazda protege 4" 2440 113 32 3.125000 little "mercury tracer 4" 2285 97 26 3.846154 little "nissan sentra 4" 2275 97 33 3.030303 little "pontiac lemans 4" 2350 98 28 3.571429 little

as can see error message not right copy. may want utilize unnamed scheme expand .gz file , investigate. (i not getting error r 3.1.1 (snowleopard build) running in osx 10.7.5.) setup succeeds:

data('fuel.frame', lib.loc='/library/frameworks/r.framework/versions/3.1/resources/library/')

r

libreoffice - How to delete last page -



libreoffice - How to delete last page -

i have document contains 2 pages. @ first have table top bottom of page. sec page consists of single unprintable paragraph character. cannot delete character. want have 1 page table. is possible? tried ctrl+shift+del @ lastly table cell, not work. software version: 4.1.3.2

this may not reply looking for:

as per this blog post:

problem: open office text document tables ends blank page @ end of document if lastly table fills previous page. why? new line character refuses deleted on lastly blank page.

bug #254655

in openoffice author seems tables insist on beingness followed new line. means cannot rid of new line characters between tables. means cannot rid of new line character when follows table @ end of document.

this latter case can mean need cut down size of bottom page margin create sure new line character doesn’t printed on new page.

what ought happen there should no new line of text after table unless want one.

resolution:

not bug. (seriously?)

libreoffice

asp.net - InnerHtml in c# -



asp.net - InnerHtml in c# -

i have <td id="statuspreview" runat="server"></td> , gets populated js function by:

document.getelementbyid('statuspreview').innerhtml = ext.getcmp('tycomboedit').getrawvalue();

now, alter content of td in c# when button clicked.

i created next method:

protected void hiddentoggletofrenchbackend(object sender, directeventargs e) { this.statuspreview.innerhtml = "aaaaa"; }

it not alter content on td. however, if place alert after setting innerhtml alerts aaaaa though td content has not changed reflect this. if place alert before setting innerhtml alert blank.

how can alter innerhtml of div?

thank you!

update:

if alter html <td id="statuspreview" runat="server">q</td> alert shows q if placed before setting innerhtml, , switches aaaaa if placed after. if innerhtml taking value on pageload, not current value.

to update asp.net command during directevent, should phone call .update() method.

protected void hiddentoggletofrenchbackend(object sender, directeventargs e) { this.statuspreview.innerhtml = "aaaaa"; this.statuspreview.update(); }

c# asp.net ext.net