Posts

C# create an image that follows the mouse -

i'm trying create program within winform in c# image follow mouse outside application. i have no clue how draw image outside of form, let alone have follow mouse. solution going - create borderless form , have follow mouse - solution not work because cannot move form via code. the mouse needs able click , function independently image. how go doing this? it must without changing way mouse used. set ws_ex_transparent extended styles make form ignore mouse clicks. set topmost true , opacity less 100% make semi-transparent. move form timer. like: public partial class form1 : form { public form1() { initializecomponent(); this.opacity = .5; this.topmost = true; this.backcolor = color.yellow; this.formborderstyle = system.windows.forms.formborderstyle.none; // makes form circular: system.drawing.drawing2d.graphicspath gp = new system.drawing.drawing2d.graphicspath(); gp.addellipse(this...

ruby on rails - font-awesome fa-trash not working in production -

Image
i'm using font-awesome in rails app , fa-trash works on development machine when deploy fa-trash stops working , different icon. other icons work fine in production, it's fa-trash. if use fa-trash-o works fine. here example of 3 icons, show, edit & delete, delete supposed trash can. here code icons <td class="th_icon icon_table"> <a id="show" href="/api#/costings/{{costing.id}}"><i class="fa fa-search-plus fa-lg"></i></a> <a id="edit" href="/api#/costings/{{costing.id}}/edit"><i class="fa fa-edit fa-lg"></i></a> <a id="delete" href="" ng-hide="costing.code == 1" ng-confirm-click="destroy(costing.id)"><i class="fa fa-trash fa-lg"></i></a> i've cleared out assets , re-compiled them & restarted server , cleared out cache in browser, test...

Sending file by wifi in android -

hi want send file direct using wifi. search lot in internet , find p2p wifi connection in developer.android site problem not work on every phone , mean phones support p2p connection can use it. looking way. find android app name zapya sending file android phone phone , work on every phone. can how use wifi send data first try search on google , post question.... here link data transfer between 2 wifi devices

django - How do I inspectdb 1 table from database which Contains 1000 tables -

i got schema contains 1000 tables,and many of them don't need, how can inspectdb tables need? you can in python console, or in *.py file: from django.core.management.commands.inspectdb import command django.conf import settings your_project_dir.settings import databases # replace `your_project_dir` settings.configure() settings.databases = databases command().execute(table_name_filter=lambda table_name: table_name in ('table_what_you_need_1', 'table_what_you_need_2', ), database='default') https://github.com/django/django/blob/master/django/core/management/commands/inspectdb.py#l32

ios - Cropping image to 1:1 and then resizing it -

i having problem in cropping image . my flow : 1)crop image 1:1 (for example , if there image of size 665 x 985 px crop 665 x 665 px ). 2)resize 612 x 612 px same instagram . for code use : uiimage *image = [info objectforkey:uiimagepickercontrolleroriginalimage]; nsdata *d=uiimagepngrepresentation(image); cgfloat pic_crop; nslog(@"size of image(bytes):%lu",(unsigned long)[d length]); nslog(@" original image size :%.2f \n",(float)d.length/1024.0f/1024.0f); nslog(@"original height --->%f",image.size.height); nslog(@"original width --->%f",image.size.width); if (image.size.height > image.size.width) { pic_crop=image.size.width; nslog(@"%f",image.size.width); } else{ pic_crop=image.size.height; nslog(@"%f",image.size.height); } then crop , if height less crop height size or width size ! _previewimage.frame = cgrectmake( _previewimage.frame.origin.x, ...

java - Simple Producer Consumer used to send partition notification using HCATALOG -

i not able receive notifications using hcatalog using jms. wrote simple producer consumer program. apache mq service running in background. able send simple text messages using apachemq. "markpartitionforevent()" not able send event consumer's "onmessage()" call. refered following link : https://cwiki.apache.org/confluence/display/hive/hcatalog+notification please guide import org.apache.hadoop.hive.conf.hiveconf; import org.apache.hadoop.*; import org.apache.hadoop.conf.configuration; import org.apache.thrift.texception; import javax.jms.messageconsumer; import javax.management.*; import org.apache.activemq.activemqconnectionfactory; import org.apache.hadoop.hive.metastore.hivemetastoreclient; import org.apache.hadoop.hive.metastore.api.partitioneventtype; import org.apache.hadoop.hive.metastore.api.partition; import org.apache.hcatalog.common.hcatconstants; import java.util.properties; import javax.jms.*; import javax.jdo.*; import javax.naming.*; impo...

excel - Why is sheet being included in VBA when i've asked for it not to be -

does know why not sheets being excluded defined in code below? seems sheet 'asset' still being included. many thanks sub run_me_to_fix_columns() dim ws worksheet '------------------------------------------------------------------ 'list names of worksheets exclude sub resizingcolumns '------------------------------------------------------------------ const excludesheets string = "control,diva_report,asset" '------------------------------------------------------------------ each ws in activeworkbook.worksheets if iserror(application.match(ws.name, split(excludesheets, ","))) call resizingcolumns(ws) end if next end sub sub resizingcolumns(ws worksheet) ws ws.range("a:az").columnwidth = 10 end = 1 24 numbers = worksheetfunction.count(ws.columns(i)) text = worksheetfunction.counta(ws.columns(i)) - numbers if numbers < text w...