query_id
stringlengths
4
64
query_authorID
stringlengths
6
40
query_text
stringlengths
66
72.1k
candidate_id
stringlengths
5
64
candidate_authorID
stringlengths
6
40
candidate_text
stringlengths
9
101k
b3aec8edcc1c00b794ab60a63cd8cd6f4a38536c93d7254af35e046da35e5350
['8d7288299adf4074a6b95b8836760fc7']
Why JEFT OpAmp. The reason is that filter resistor values are quite large and in the HP their value changes when selecting a different cutoff frequency. This would cause dramatic change of overall offset if using a BJT amplifier, caused by the input bias and offset current. And, yes, the input stage design and distortion looked very good.
c31315d1896d923e1983f75e955c2d21010e35270bdad3207b34118b2f496d4e
['8d7288299adf4074a6b95b8836760fc7']
@Transistor Not correct: the tower is a tip around a flat area (and "attracts" lightning strikes), it's not insulated as you might think (foundations are grounding it to the island, but not as good as standards require and common sense wishes), so you need a good grounding that let the lightning current discharge (e.g. 100 kA) with a limited overvoltage and overheating. Otherwise the lightning discharge will break or worse blow up foundation reinforcement, depending on the local resistance between interfaces.
aa4e7c1d4edc968900d6fd42e26677ca00b79a0397f93bd1ce2dd9111e60e701
['8d91838913844bdb857608e0f5c107f6']
To Enable chatter first you need to inherit your model from mail.mesage class Example: class sale_order(osv.osv): _name = "sale.order" _inherit = ['mail.thread'] This will enable chatter functionality on your Model, now next thing you need todo is: <record id="view_order_form" model="ir.ui.view"> <field name="name">sale.order.form</field> <field name="model">sale.order</field> <field name="arch" type="xml"> <form string="Sales Order" version="7.0"> ... </form> <sheet> ... </sheet> <div class="oe_chatter"> <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/> <field name="message_ids" widget="mail_thread"/> </div> </field> </record> this will add chatter in your form view and then your message_post will show up. code : <field name="state" widget="statusbar" statusbar_visible="i,j"/> is for statusbar not for chatter. Bests
3f1635f7edea0bfdcf341c08074a3a13c0d3873c24e334d274eee86e69d2b9f0
['8d91838913844bdb857608e0f5c107f6']
QWeb is nicer templating tool and it was created by <PERSON> and its designed to work cross language originally which can be forked from git - qweb. Original framework is designed to work with CSharp, JavaScript, PHP, Python, Ruby so wtih your technical abilities you can fork and maintain your own qweb templating tool. Or else, You can choose between thousands of templating tools available on all programming languages
2ccee8fd8cca0fadacfe1aa354443ece751ae24bf9fb70ce9c4094c5ca4db0ee
['8db07c97e0594a5b9a56171d043a69af']
odoo works like transaction untill transaction is not completed it didnot commit it.odoo calls create function and do all its functionality but it didnot reflect in database untill it returns the value, you will get its values in function but it didnot commit this in database untill function returns the value
db97a9ad8b02fa9914bb5615ab6a2d26c214020b13116f9dda66b9553b34e359
['8db07c97e0594a5b9a56171d043a69af']
There is only one reason xml is not updated is that you put all this code in data noupdate=1.In no update=True it didnot update our data in an external id if that id is not present in our system it will create it if id is present it didnot update its attributes.
203378fad26b2a2f3c32ab8947caa3fa56a43804b1a410364545f0cc970914af
['8db301400b744922b7e29f70a221659f']
I am working on a MailChimp subscription form that will need to send the form $_POST data to MailChimp, but not actually load the success page. I.e. I want it to load custom JS on submission. This is what I have so far. Obviously the preventDefault is breaking the submission. Any thoughts are greatly appreciated: <!-- Begin MailChimp Signup Form --> <link href="http://cdn-images.mailchimp.com/embedcode/slim-081711.css" rel="stylesheet" type="text/css"> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <style type="text/css"> #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } </style> <form action="http://yourmove.us5.list-manage.com/subscribe/?u=00000444444333331&id=aaa111444iiii" method="POST" id='mc_embed_form'> <div id="mc_embed_signup"> <h3>Subscribe to <em>Our Newsletter/em> for your free download:</h3> <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required> <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button" novalidate></div> </div> </form> <script type="text/javascript"> $(document).ready(function(){ $("#mc_embed_form").submit(function (){ event.preventDefault(); showConfirmation(); }); }); function showConfirmation() { alert("successful"); } </script>
c11325d6e9fbace19622906714b84b8faae80ea5d4edc1a47cb83358d4c49bd0
['8db301400b744922b7e29f70a221659f']
I'm using the cformsII form plugin for Wordpress. When debugging with firebug, I see that the following uri is not able to be navigated to (404 error): .../wp-content/plugins/cforms/cforms-captcha.php?ts=2&c1=4&c2=5&ac=abcdefghijkmnpqrstuvwxyz23456789&i=i&w=115&h=25&c=000066&l=000066&f=font4.ttf&a1=-12&a2=12&f1=17&f2=19&b=1.gif I have verified that wp-content (including subdirectories and files) has proper 777 permissions. Furthermore, I verified that I could navigate to 1.gif without issue. Finally, I verified that the GD library is installed as well.
0858f087e818283d3296da13550debdac74dee1313e18655168cc20d47047364
['8db597f80e764c3682f82bd3c0c03370']
That setup imply a lot of important parameter that are not shown on the question (iptables/used steps/kernel network config/br setup/etc) here are some possibilities to solve the communication issue (in the master host side): Possible solution: A bridge interface as its name indicate is a gateway between multiple network interfaces in your setup it seem that you have: [KVM1-ETH0] <---> [Bridge][virbr0] <---> [Master][Bridge][virbr0-nic] [KVM2-ETH0] <---> [Bridge][virbr1] <---> [Master][Bridge][virbr1-nic] First i don't understand why you need 2 bridges interfaces and then the second problem as @LL3 mentioned the interface virbr0-nic is not turned on. Second a more clean setup would look like this (depending on your needs) [KVM1-ETH0] <---> [Bridge][virbr0] <---> [Master][Bridge][virbr0-nic] [KVM2-ETH0] <---> [Bridge][virbr1] <---> [Master][Bridge][virbr0-nic] Or [KVM1-ETH0] <---> [Bridge][virbr0] <---> [Master][enp0s31f6] [KVM2-ETH0] <---> [Bridge][virbr0] <---> [Master][enp0s31f6] Or [KVM1-ETH0] <---> [Bridge][virbr0] [KVM2-ETH0] <---> [Bridge][virbr0] Possible solution: Bring up virbr0-nic and virbr1-nic (adapt the ip to your needs) ifconfig virbr0-nic 192.168.122.254/24 up ifconfig virbr1-nic 192.168.122.254/24 up But still virbr0-nic and virbr1-nic are not linked together. Possible solution: If you want to use your main interface you can add it as master to your bridges (depending on your needs) ip link set enp0s31f6 master virbr0 ip link set enp0s31f6 master virbr1 Possible solution: Check your iptables/firewall setup (firewall like shorewall for instance if you use that), for a testing purpose you could empty the iptables before starting your setup. #Netfilter cleanup iptables --flush iptables -t nat -F iptables -X iptables -Z iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT Possible solution: Host routing/forward feature. Normally ip_forward kernel feature is not required for bridges interfaces to work but this could help if the bridge is not well configured in the first place. (note that enabling ip_forward make the the master host act as a router, in a production environment this require additional precaution with iptables or other) #Enabling ipv4 forwarding echo "1" > /proc/sys/net/ipv4/ip_forward Possible solution: Following the ip_forward possible solution you can use masquerade to force a bridge traffic to use a specific interface iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE In this example the traffic of the bridge with the ip <IP_ADDRESS><IP_ADDRESS>/24 up ifconfig virbr1-nic <IP_ADDRESS>/24 up But still virbr0-nic and virbr1-nic are not linked together. Possible solution: If you want to use your main interface you can add it as master to your bridges (depending on your needs) ip link set enp0s31f6 master virbr0 ip link set enp0s31f6 master virbr1 Possible solution: Check your iptables/firewall setup (firewall like shorewall for instance if you use that), for a testing purpose you could empty the iptables before starting your setup. #Netfilter cleanup iptables --flush iptables -t nat -F iptables -X iptables -Z iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD ACCEPT Possible solution: Host routing/forward feature. Normally ip_forward kernel feature is not required for bridges interfaces to work but this could help if the bridge is not well configured in the first place. (note that enabling ip_forward make the the master host act as a router, in a production environment this require additional precaution with iptables or other) #Enabling ipv4 forwarding echo "1" > /proc/sys/net/ipv4/ip_forward Possible solution: Following the ip_forward possible solution you can use masquerade to force a bridge traffic to use a specific interface iptables -t nat -A POSTROUTING -o eth0 -s <IP_ADDRESS><PHONE_NUMBER> -j MASQUERADE In this example the traffic of the bridge with the ip <PHONE_NUMBER> will be forwarded to eth0 (this require ip_forward) Possible solution: You could consider other setup solution (other than bridge interface) like macvlan, ipvlan or veth interfaces (some examples)
53f63ad04cebae69c73e4cb21a47f4f60b0189df6efddfed2a738df625483282
['8db597f80e764c3682f82bd3c0c03370']
Available customization? The setting gtk-recent-files-enabled=false can be added to ~/.config/gtk-3.0/settings.ini that would disable the recent entry. Also not directly related but gtk-recent-files-limit=0 and gtk-recent-files-max-age=0 can be used as well to disable recent files. For Gtk2 this solution is used to disable recent files. Other settings suck as show hidden files or startup mode can be set with gsettings set org.gtk.Settings.FileChooser show-hidden true gsettings set org.gtk.Settings.FileChooser startup-mode cwd Screenshot of dconf-editor with other available settings
45c707a7bc008c0be5b7e0f62d75b4fe0c05d385b62b11f482075b48db481f14
['8db7a3f6a47d4276acc05e3379813b53']
<PERSON> I wouldn't, if you don't have the confidence to do it yourself, then it's not worth doing. Not a great idea to rope others in to your problems because if it goes badly, then they may not thank you for it. Remember this is the CEO, not the manager. The only one I would perhaps take it to is my manager and then leave it with him/her.
5ec8b633525dd26db586bad7aa362a39fccf4ac330b5cdd32e481dcdf9f63923
['8db7a3f6a47d4276acc05e3379813b53']
interaction between us still feels awkward That's because it IS awkward, she complained to management about what seems to you to be an innocuous remark with no malicious intent. How can I improve this situation? There's nothing to be improved. Just a lesson to be learnt and an insight into her personality, don't make any remarks on her appearance. Thinking before you speak at all is actually a major asset in the workplace and perhaps life in general. Friends and colleagues are not the same thing.
49fdf7030d3e892595154f4ee2cf12da7cca322ecb287ea1302d66fcb1754eb4
['8dccc9c9933a4ca992b0cfe1ba4337bd']
So, just needed to generate the release SHA1 footprint with keytool -list -v -keystore ~/pathToYourKeyStore/your_release_key.jks -alias yourKeyAlias -storepass yourStorePassWord then added this SHA1 followed by a ; and the name of the package in "Android Applications" to my public access API key (in the Google Developers Console). And, because I also use OAuth I had to create a new Client Id for the app with this new SHA1 certificate. And then, wait for few minutes before it works (in my case anyway).
de134a8210b8297f45ee0c6e76e8c94d15eb8fa6f512dd54c190db37a917a5db
['8dccc9c9933a4ca992b0cfe1ba4337bd']
In Android Studio, I'm trying to use Google Clood Datastore from an Android app. With the Google example https://cloud.google.com/datastore/docs/concepts/indexes#Datastore_Indexes_and_properties I am able to add <PERSON> (32 years old) and <PERSON> (30 years old) as Person and as children of the Company Acme. I can see these two entries are in the datastore in the Google Developers Console. I can retrieve children from Company Acme if I set a query filter as below. Key acmeKey = makeKey("Company", "Acme").build(); makeFilter("__key__", PropertyFilter.Operator.HAS_ANCESTOR, makeValue(acmeKey)).build())); If I want to retrieve only Person where age is equal to 32 I add to the filter above makeFilter("age", PropertyFilter.Operator.EQUAL, makeValue(32)).build() Then, I get the Person Tom. But, if, instead of Operator.EQUAL I put an inequality filter like Operator.LESS_THAN or Operator.GREATER_THAN I get the error "no matching index found". I think it's a problem of indexes, but I really don't understand how can I set an index. I use Android Studio and I don't use at all the App Engine. I just want to retrieve data as I do with MySQL with a simple WHERE age > 32. Btw, I tried with GQL and I get exactly the exact same problem, work with EQUAL, but not with GREATER_THAN (and same in https://developers.google.com/apis-explorer). So, does anybody know how I can fix this problem ? Thanks !!
06e9e339c976be611c754a6d1f709fb4433e14e6570ed0a9ff96d2ebef0a54fe
['8dd13569f628494bb1f0ea17303f49bb']
From what I understand, there seems to be a 'VQ' parameter that you can attach to the end of the embed iframe and set hd720 or hd1080 as the value. After some research it seems YouTube once offered the 'VQ' parameter, then took it away, and as of this writing is back again! In short, your embed should look something like this: <iframe src="https://www.youtube.com/embed/VIDEO_ID_HERE?vq=hd1080" frameborder="0" allowfullscreen></iframe> Here is an article related to this that I found during my research: Found Here I've tested this briefly on a page and it seems to work (for now). Hope this helps!
9c21ee791836a6d293824b94524c79e22bb1b98f21138135d314af8fc26306a5
['8dd13569f628494bb1f0ea17303f49bb']
Hello <PERSON>, There are several ways to do this but here are a few. As a quick solution you could do this using a plugin like this: https://wordpress.org/plugins/safe-redirect-manager/ OR via .htaccess using this code: RedirectMatch 301 /animal(.*) /category/animal-list/$1 OR you may be able to adjust the settings for your permalink structure. Hope this helps.
f24aaf7290b46447bfc65fe2c38489b317177effcf790c896b21485049fb9695
['8dd51ffcac7c433eb34fdb6500c6f103']
If you use ArangoDB with the MMFiles storage engine, writes block reads and locking is on collection level. Thus the edge collection can't be accessed while the query is executed and edges are written to peopleAndMovieRelation. With the RocksDB storage engine however, document-level locks allow for concurrent writes. Writes do not block reads. Reads do not block writes. https://docs.arangodb.com/3.2/Manual/Architecture/StorageEngines.html
8a9963939349f96c4a22eab5f7ef423d1988ee61f2696e5b8df6cfb98a119e32
['8dd51ffcac7c433eb34fdb6500c6f103']
OBS Studio comes with a Default and a Dark theme. The Default theme uses the native system style (Windows 10 in my case), whereas the Dark theme is a custom design. I noticed that the custom design does not have on-screen arrow buttons for scrollbars: Don't Qt scrollbars have arrow buttons, or were they disabled by the QSS? If so, how to enable them?
8fb54ac347255be3c12b370cca5ec05e17300fb2bdac5d65309da10ac6f55259
['8dd7754c8d5b47b2920bf2b81deb07ca']
I have recently reinstalled Adobe Photoshop CC 2018 after getting a new computer. In the past I could use the Quick Selection tool without any issues but in the new installation I'm facing some issues. Whenever I make a selection and then select "Layer Via Cut" a white border is produced. This is the options set for the quick selection tool... And this is the white border produced when cut out... When I use any other tool such as the magic wand the issue does not occur, this is obviously an issue with the Quick Selection tool. From what I understand it is possible to refine the selection using an option nested within Photoshop but I am preferably looking for a change to the Quick Selection options, this didn't happen two days on my old Photoshop installation. Does anyone know why this occurs? Is it fixable?
222c28e87e82cb0e71ac22c250205ee971e246aa1fd0b6dd718f7cf3cb636496
['8dd7754c8d5b47b2920bf2b81deb07ca']
@CRDrost If you're explaining it to people on Math.SE rather than ten-ear-olds, why do you start you answer by saying that "_this is if you've got kids in the 10-15 range who can appreciate a little more detail and drama, but maybe aren't quite as serious as high-schoolers_"?
191174b9f1d8eda9f8931e6c300de1b88ed76c39d40653d457f698fa5ec256c0
['8dea858cfce847c9ac88657aeab070d0']
I need to multiply 2 matrices in swift, so in order to use accelerate I need 2 arrays with type double. The issue is, the two arrays that I need to multiply are type UInt32. Is there anyway to convert a UInt32 array to a double array? var UInt32TestArray: [UInt32] = [1,4,2,3] var Int32TestArray: [Double] = [Double](UInt32) //Doesn't work
d4030fe28b6d4a99fca3fd064837b4d27e2975532ded78fd989db1b5ef492a6c
['8dea858cfce847c9ac88657aeab070d0']
so I'm working on exporting a .txt file from Xcode, but whenever I try to export it, say through email, it creates an email with no attachments and an empty message. When I try to export it to iCloud Drive, a white screen comes up for a second, then leaves. When I check iCloud Drive, the file isn't there. What is wrong here? let message = testLabel.text func getDocumentsDirectory() -> NSString { let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) let documentsDirectory = paths[0] return documentsDirectory as NSString } let filePath = getDocumentsDirectory().appendingPathComponent("matrixFile.txt") do{ try message?.write(toFile: filePath, atomically: true, encoding: String.Encoding.utf8) }catch let error as NSError{ testLabel.text = String(describing: error) } let documentInteractionController = UIDocumentInteractionController() documentInteractionController.url = NSURL.fileURL(withPath: filePath) documentInteractionController.uti = "public.data, public.content" documentInteractionController.name = "matrixFile" documentInteractionController.presentOptionsMenu(from: view.frame, in: view, animated: true)
45c668f5059d5ddb6212a61b8a91b228847c22b9bc92d0306ecf41367c29a3bf
['8deaa99c943348d98a6e3b7e0e94a3ca']
Thanks <PERSON>! Yes, it is all the same power meter. I'm assuming homeplug is the same as powerline, yes? I was told that there are 2 units. One plugs into the modem and electrical outlet in the house and the other plugs into the router and electrical outlet in the apartment. I think that might be what you are explaining. See, I told you I'm a novice!
fe4d5d3877411e1f581ae056d82feaf5082cbdb8f94e39b27684968fc04a3e6b
['8deaa99c943348d98a6e3b7e0e94a3ca']
What is the exact difference between object pool and connection pool? Is there any difference to in their algorithm for utilizing memory. msdn says "Object pooling lets you control the number of connections you use, as opposed to connection pooling, where you control the maximum number reached." What exactly this mean? Please help me to clarify above.
154d9128daf41be836417d3859639b7c469a5663c63607db6fa45c624de75161
['8ded40bfe2554680986176421b711e12']
thanks for that Framework. I really like the idea and I'm eager to use it! However, I'm currently trying to get this up and running with an app that uses realm as well. I initially tought, It might be a good idea to create a realmService which I inject to my models and which handles all of the realm write stuff. Sadly, I can not make my mind up on how to do this properly. The Wether App example is great, but it doesn't cover any realm models. Any hint to point me into the correct direction or something? I tried via constructor and property but I just can't get it to work. I guess, I'm missing something conceptual. Thanks, I'm eager to learn from you :) Cheers
252a13e079e4dfcaccbbd54976eb0a765a1b0db8ad72d20ac64e814e26318a6e
['8ded40bfe2554680986176421b711e12']
I'm currently implementing my first app in swift, which uses Realm. I really like it! However, I tried to make my models "good" but I really feel I made them worse for realm. Here's an example model: import RealmSwift class Location : Object { dynamic var ident = "" dynamic var package = "" dynamic var title = "" dynamic var is_selected = false let contentSets = List<ContentSet>() convenience init(ident : String, package: String, title : String, is_selected : Bool) { self.init() self.ident = ident self.package = package self.title = title self.is_selected = is_selected } override static func primaryKey() -> String? { return "ident" } func save() { let realm = try! Realm() try! realm.write { realm.add(self) } } static func findAll() -> Results<Location> { return try! Realm().objects(Location) } static func findByIdent(ident : String) -> Location?{ return try! Realm().objects(Location).filter("ident == %@", ident).first as Location? } static func getSelected() -> Location? { return try! Realm().objects(Location).filter("is_selected == true").first as Location? } func hasContentSetByObject(contentSet : ContentSet) -> Bool { return self.hasContentSetByString(contentSet.ident) } func addContentSet(contentSet: ContentSet) { let realm = try! Realm() try! realm.write { self.contentSets.append(contentSet) } } func isSelected(value: Bool) { let realm = try! Realm() let selectedLocation = Location.getSelected() selectedLocation?.isSelected(false) try! realm.write { self.is_selected = value try! realm.commitWrite() } } func hasContentSetByString(ident : String) -> Bool { let result = self.contentSets.filter{$0.ident == ident}.count > 0 ? true : false return result } } My idea was, to keep everything realm related out of my controllers. However, in regards to update data on the models this approach is bad I feel, because it erases a lot of Realm's flexibility. How are you guys doing that sort of stuff? Looking forward to your input. Regards, SantoDE
ad47ee9d66eb5b58f1aa710aec30bff5a51bd0f991d70fe02e2406f827cc05b8
['8df719034464473f8063683b06ba9e6c']
The code below works only if you refresh the browser just ten miunets before specified time: var specifiedTime = new Date("November 02, 2017 05:56:00"); var specifiedTimeMinutes = specifiedTime.getMinutes(); var currentTime = new Date(); var currentTimeMinutes = currentTime.getMinutes(); if(specifiedTimeMinutes-currentTimeMinutes==10) { alert("test"); } Do you need to make it automaticaly without refreshing the browser?
3d552cc6f29fe214df2237036b7950d4ec9fbabccf26225c8cf5ad7eb7df1412
['8df719034464473f8063683b06ba9e6c']
If you have a problem with some functionality, start simple: <body> <script> window.close(); </script> </body> It works just perfect on every browser. If you would like to close the window that you previosly opened: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_close From the question itself, I am not able to determine what you really want to achive? Would you like the window to be closed on some event?
7b0810456c6ad1a4dc74858b34147cfd8e7060b91acd583d3eb6ea20daa46ff3
['8e080495cc1d4711aecb99ef49c7afaa']
There are a ton of pros and practically no cons to having the DNS server on the DC. Both roles are highly unlikely to cause any significant load on your server. If your network were large enough that DNS and/or DC performance were potentially an issue, you wouldn't be asking such a basic question.
24178f30237837d2b875221c940ad6bc9aa24283f54e4ee4382231d9d9ec552f
['8e080495cc1d4711aecb99ef49c7afaa']
I have a problem where I delete an older version of a page layout but it keeps coming back and the changes I made to that page layout do not take effect. I would like to know if there is a way to make SharePoint 2010 always overwrite all files when doing a deployment to a server.
a3d4acf7c87e26c9199f13a47301315a08c29a48f2f5fd9f5db6ab371b629e41
['8e101f9f81674c4592e2f5d0a1463696']
Your vertices array should match the layout of textureVertices array. That means that 8 vertices are not enought to render textured cube, beacuase the vertices at the same position might have different texture coordinates depending on what face they belong to, because indices are indices into both the texture and vertex array. Consider a cube rotated so that an edge faces You. On the left side of the edge, the texture ends. On the right side, the texture starts.
409c67b47ea1760d697bd6ce03325cd1dadd1c05fa8f3f1fca2c076d63f9ec36
['8e101f9f81674c4592e2f5d0a1463696']
Yes, canvas supports returning the image data as either Base64 encoded data url or Blob. See http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvas-todataurl . You can then grab the data url and post it using AJAX to your server, and Base64-decode it there.
8d8c2dcdd83cb0767bc0adbbe106810e11d7d08f9653443419f6bf1cf90fb96f
['8e25a99df4f4412fbb89eff7ba1247d0']
I need some help to put an if statement together using jQuery. I want to change the logo on my site, if two conditions are true. Here is some pseudo code, hopefully explaining what i want to archive: if(li hasClass active and data-menuid is equal to 0033){ change logo... } Here is a simple example of the menu structure: <div id="menu"> <ul id="menu-primary"> <li class="menuactive" data-menuid="0011"> Test1 <ul class="menu-dropdown"> <li data-menuid="0022">Test2</li> <li class="active" data-menuid="0033">Test3</li> </ul> </li> <li data-menuid="0044">Test4</li> <li data-menuid="0055">Test5</li> </ul> </div>
ba065ac4e27fc8796a609d2072f6a321edf95d683210cb89fae4b761ab2bc278
['8e25a99df4f4412fbb89eff7ba1247d0']
I'm trying to export a Vue SFC but i'am not sure how to export the component including the mySwiper object. I hope to see an example from someone who know-hows to do it. Below the JS part of my SFC <script> import Swiper from 'swiper' var mySwiper = new Swiper ('.swiper-container', { // Optional parameters direction: "horizontal", loop: true, // Navigation arrows navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", } }) export default { name: "Employees", } </script>
60888a077716da4420b1c6c686de823cb907af2926c76f538bbb1b2440afa4dc
['8e45e84e3cab43e4a61319ca611d85a7']
I have an ascii file containing 2 columns as following; id value 1 15.1 1 12.1 1 13.5 2 12.4 2 12.5 3 10.1 3 10.2 3 10.5 4 15.1 4 11.2 4 11.5 4 11.7 5 12.5 5 12.2 I want to estimate the average value of column "value" for each id (i.e. group by id) Is it possible to do that in python using numpy or pandas ?
93cd29ac9b79788847728c423d61f3372c22c07c801a34615f2a05d90042f6b5
['8e45e84e3cab43e4a61319ca611d85a7']
I have an ASCII file with the following columns : ID, val1, val2, val3 where ID is a row_number but not sorted. I want to write a new ascii file with the same columns with sorted ID (from smaller to larger). How I could do that in python? In fact, this file has been produced by the concatenation of 2 ascii files using the following code: import os.path maindir1="/home/d01/" maindir2="/home/d02/" outdir="/home/final/" pols=[ "F1","F2","F3" ] months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"] for ipol in pols: for imonth in months: for kk in range(1, 7): template_args = {"ipol": ipol, "imonth": <PERSON>, "kk": kk} filename = "{ipol}_{imonth}_0{kk}_L1.txt".format(ipol=ipol, imonth=imonth, kk=kk) out_name = os.path.join(outdir, filename) in_names = [os.path.join(maindir1, filename), os.path.join(maindir2, filename)] with open(out_name, "w") as out_file: for in_name in in_names: with open(in_name, "r") as in_file: out_file.write(in_file.read()) How could I define to the above code to write the final file in a sorted way (based on the first column) ?
10851d97e24fc7f73258f7278ffcf9a218f5b2ce7bead4e2a1c9219c5f3569fd
['8e47117384044681ac3fc9242cdbb3e7']
I came across this too. The documentation says: Broadcast to the channel from anywhere inside your Rails application. An existing controller, a model, a background job, or a new WebsocketRails controller. i.e. no mention of the console. In my experience, it works exactly as described fine from the controller though.
6f851f419ec23d7776bb4bab223f41d6a9fecfda17aeb5c4ed6eb6251cd2540f
['8e47117384044681ac3fc9242cdbb3e7']
As per the instructions at http://progrium.com/localtunnel/ and elsewhere: gem install localtunnel localtunnel -k ~/.ssh/id_rsa.pub 3000 I get the error: /path/to/gems/net-ssh-2.6.7/lib/net/ssh/transport/packet_stream.rb:103:in `block in next_packet': connection closed by remote host (Net<IP_ADDRESS>SSH<IP_ADDRESS>Disconnect) It does not matter whether I include the key or not, or try different port numbers i.e. localtunnel 3000 Any ideas?
166d40bb51a9a0085ca6769025ddfb05468bab855e55355f61ef1659403e20e5
['8e58a8e8158340ee934946e2e32f42ed']
In general, without knowing more details, my gut sense would be that the latter would be more appropriate, i.e. create a new component for each page. You require two fundamentally distinct types of entities: a collection and a single item from that collection. The first solution that you propose, i.e. a generic component, would be more suitable to multiple entities that all share some basic underlying structure but differ in some (but not all) details, e.g., two different collection views that both list all items but format those items in two different ways. To force that strategy onto your use case would require your generic page component to have no universally shared structure: what template or logic would you share between a todo-list collection and a single todo-item from that collection? Everything would depend on the value of the type attribute. Then what meaning would page have? Essentially nothing. Your latter suggestion, i.e. having two distinct components for these two different entities, seems more in the true spirit of how angular components are meant to be used. I suppose one could argue that a more generic page component/view could have some valuable structure that persists for both the list view and the detail view, e.g. main title, navigation links, user info, etc. However, even if you implemented that, I think you'd want to eventually create separate (more deeply nested?) components for the whole list versus for an individual item, which eventually comes back around to implementing your latter suggestion. I think a useful model is the example code provided on the official Angular2 web site. I could point to several different examples, but I think the clearest parallel to your situation is in the "Advanced Documentation" section, under the "Routing & Navigation" heading. There they provide code that separates components as follows: hero-list.component: This would seem to parallel your listpage. hero-detail.component: This would seem to parallel your detailpage. Clearly they've separated out these two parts of the app into distinct components. This sort of strategy decision may also depend on the size/complexity of your "entities". If your "list" and "detail" views were both extremely simple, I suppose you could distinguish between them within a single component (e.g. page), just using an attribute (e.g. type). However, in a todo app, I can't imagine either a list view or a detail view being extremely simple. Thus trying to squash both into a single page component would make the component too complex.
2ecab8441c4da431d08cbfef9b37f9d895ae25dc08fdd51c571e3f997f80df79
['8e58a8e8158340ee934946e2e32f42ed']
Here's one among many possible solutions. Get a random hue between 0 and 360. Use 100% saturation and 50% lightness for the main color, and 100% saturation and, say, 80% lightness for the "highlight" color. Just keep clicking the "Run code snippet" button to see more random colors. document.querySelectorAll('div').forEach(d => { const hue = Math.floor(Math.random() * 360); d.style.backgroundColor = `hsl(${hue}, 100%, 50%)`; d.style.borderColor = `hsl(${hue}, 100%, 80%)`; }); div { display: inline-block; width: 20px; height: 20px; border: solid 5px; margin: 5px; } <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div>
680caa2e026ebed4943ddc7580719e7d9c7dc7f1414b26777fe612c9e3365584
['8e5a6a9c93dd4e4995363021dca8d42d']
<PERSON> - The BIOS enumerates the hard drives, not the OS, and then it knows the boot order (due to configuration) so it then knows to look for a master boot record (MBR) on each device, in sequence, and if it finds one, it loads the MBR into memory and executes it. At that point it's whatever's in the MBR that now has control of the computer. This is the correct answer, I think.
6cf0329d347b5103ff0b7e3ed3706d792ddf84eb7e639e7cc76eff662dacb2a2
['8e5a6a9c93dd4e4995363021dca8d42d']
Escape sequences have a lot in common with the concept of out-of-band communication: Also sometimes used to describe what communications people call shift characters, such as the ESC that leads control sequences for many terminals, or the level shift indicators in the old 5-bit Baudot codes. Let's say you're doing a file transfer over a serial port and you negotiate with the computer on the other end: "OK, here comes the file". Since in the general case all characters might be valid file characters (if it's an ASCII file) you have some problems: How do you know where the end of the stream is? Some schemes use ASCII NUL (zero) to terminate, like strings in some languages, but then you can't have that character in the file. That's not allowable in some settings, like file transfers. Zero could be a valid character. You could send the expected file length first, but what if you need to abort? Various people throughout the history of computing have implemented lots of different methods to get around this problem. In the case of literal strings in a programming language, it's a similar problem. The first quote says "here comes the string - start reading until you get another quote". Of course, then you have the problem of sending a quote character, so they invented the slash escape sequence. If you see a slash and then a quote, then that's a literal quote, not the end of the string. Unfortunately you just swallowed a spider to eat a fly, because now you can't send the literal slash-quote combination. So, you can escape a slash with another slash. So slash-slash means slash, slash-quote means quote. That allowed them to use slash for other unprintable or hard-to-print characters like carriage returns, line feeds, tabs, etc.
9df27917f8fe9f4056c40d1ed2d1cc66af9a7ea90e7508f10d7c48572e6f51ef
['8e60799dc00f4584bb0252a6c32db457']
Consider the transformation $x \mapsto x, p \mapsto v = \frac 1 m [p - qA(x)]$ where $A$ is a vector potential. Then $\{v,v\} = \frac q {m^2} v\times B$ where $\{\cdot,\cdot\}$ is <PERSON> bracket and $B = dA$ is the magnetic field, so this transformation is not canonical. More concretely: With the Hamiltonian $H = (p-qA)^2/2m$, you find $\dot v_i = \frac q m (v\times B)_i$. If the form of <PERSON>'s equations is preserved, then $\dot v_i = -\partial K/\partial x_i$ where $K$ is the new Hamiltonian, the "Kamiltonian". But then $\partial_j \dot v_i$ must be a symmetric tensor, but this is not the case for arbitrary $B$.
7182e74dd3102a4317c6187b8767694949db15e6a00ee3dca38a6e9b5b80198f
['8e60799dc00f4584bb0252a6c32db457']
Antiquarks can be distinguished from quarks, so you only need to antisymmetrize two at a time. That's no problem, and even if you had 3 quarks it wouldn't be. Furthermore, you only need the total state to be antisymmetric. You could have antisymmetry in space, symmetry in spin and symmetry in color, and the whole thing would be antisymmetric. (Like how you can put two electrons in each atomic orbital and both singlet and triplet are allowed.).
3061a2dfb66720c08bd3f7ad4eaeed96fbf0909203bf635f25ef4e77d832fb4b
['8e6761777cb145dba3beeca908b37ce5']
I think the last 3rd party software I encountered that filled in such an essential void in Windows's functionality was "Launchy", which made "type the first few letters of your program to run it" the best way to launch programs, before Windows 7 came along and made this the built in behaviour when you press Windows key and start typing. This is saying a lot. Why Windows hasn't got this covered by Windows 10 is beyond belief. This app reports everything with a battery, not just bluetooth devices.
1304c1f67a86d7db860e22e716c7356675b17ef2100c3a119d7f71c694b7ec5d
['8e6761777cb145dba3beeca908b37ce5']
I am brand new in WebDevelopment and I came across the following issue. I have an html file where a textbox is defined as well as a "View all Contents" button The user can enter a value in the textbox and submit the data Then repeat this action multiple times Every time a new value is entered this value should be stored to a Javascript array The user will be able to view the contents of the Javascript array when clicking on the button "View all Contents". So my problem is how these values are stored dynamically in Javascript and printed when the user is finished. Your answer is very much appreciated. Best Regards <PERSON>
6180276e4caf0b4c34fd74cda8a92df2c2e119723bf70d58126f04c7f6bfb922
['8e6a04b0d3c044b0b5c6e1631d5ebf23']
I have to different vectors mpl<IP_ADDRESS>vector<Type1, Type2...> mpl<IP_ADDRESS>vector<Type3, Type4...> I'd like to "concatenate" them to form: mpl<IP_ADDRESS>vector<Type1, Type2, Type3, Type4...> This would allow me to prepare vector templates and reuse them afterwards. There are different solutions to my problem, but this approach seems most appropriate to me. Thanks...
56e1d85d44fd696d8b6e238e1b58095532be71d05d88722fd993e4328f59bf31
['8e6a04b0d3c044b0b5c6e1631d5ebf23']
I'm developing a messaging system and I used JBoss Netty + Google protobuf for the POC. protobuf was chosen for its swiftness of serialization/deserialization, relatively low traffic cost and availability in several languages. Still, when it comes to production under heavy load a self-coded server application can never be as good as well-established and tested frameworks. The problem is, I can't find such a framework that would allow me using protobuf as a transport protocol. Apache ActiveMQ and ActiveBlaze are the closest things I could find but the documentation is nearly absent. I stumbled upon something that is ActiveMQ protobuf implementation but there is no reminding of it in official ActiveMQ documentation (its not among the supported protocols). So my question is whether AMQ supports protobuf and if it does how it can be integrated?
7fbf08dc403f4ab92a97faa0c44fbfc4fc796c8333ad2cad3f9653a344a2f7d0
['8e719ca856e2462891eb868f6a45c0f3']
I'm tryingto learn directX programming. Looking at different tutorials there is something about Vertices that i find a bit counfusing. I know that directX uses vertices with four elements (x,y,z,w). I saw many tutorials ( example http://msdn.microsoft.com/en-us/library/ff729721(v=VS.85).aspx ) passing XMFLOAT3 as vertices positions omitting the w component. How this works ? Assuming that passin XMFLOAT3 or XMFLOAT4 doesn't change DirectX behaviour (true? ) should i set the w to 1 in the vertex shader or DirectX assumes it to be 1 by default?
01c51da17bcaf3869acb473bfc46156b83602550c06a1568ed7e73fe8cb710a0
['8e719ca856e2462891eb868f6a45c0f3']
This is because your application is loading flash player loader from the cache and then it's loading the real player from the site , finally this yield a security exception. In internet explorer , in internet options set to check for new versions of the documents each time you visit the page.
41eca4472d2fed85ca8af8ef23ae14907f30c93f625f044cd6b507b1fa072793
['8e8217cb0f1c437e9c840e7261d48459']
An alternative to the accepted answer that doesn't require a new theorem environment name is the following: \documentclass{article} \usepackage{amsthm} \usepackage{lipsum} \usepackage{needspace} \newtheorem{theorem}{Theorem} \let\ORGtheorem\theorem \def\theorem{% \Needspace*{3\baselineskip} \ORGtheorem } \let\ORGendtheorem\endtheorem \def\endtheorem{% \ORGendtheorem } \begin{document} \lipsum[1-10] \begin{Theorem} \ \begin{enumerate} \item First item. \item Second item. \end{enumerate} \end{Theorem} \end{document} This solution could be useful if you are creating a style file for existing documents.
5f91633cbe529b86b06ab6bb44e7b0dda36711c87c8e654bbfa3ee46401d2e59
['8e8217cb0f1c437e9c840e7261d48459']
@FumbleFingers I have just edited my question, added the rest of the sentences (and mind you, the sentences end the way I've written - as they are individual articles -, they don't continue with another sentence). I just wanted to find out (hopefully from a native speaker) if this was a proper usage that I'm not aware of (I don't have much experience with legal texts). And the fact that this is British English, made me question myself more as I'm more accustomed to American English. So in light of the edit, could you give me my "blindingly obvious" answer now?
72ccdc098906e062d9b12b7faab562434b5f09a12d3ff9aa8152502ea9b8f847
['8e89493a1c37426da6f17c382f85b97d']
I'm having trouble performing a simple transformation with the django orm. Desired outcome should look like this: 2018-08 2018-07 2018-06 ... And is created with this sql: select distinct strftime('%Y',a."Buchung") || "-" || strftime('%m',a."Buchung") as YearMonth from hhdata_transaktion a order by 1 desc I need it for a ModelChoiceField as queryset, so I'm bound to the ORM here? My try from django.db.models.functions import TruncMonth, TruncYear Transaktion.objects .annotate(year=TruncYear('Buchung'), month=TruncMonth('Buchung')) .distinct() .order_by('-year', '-month') .values('year','month') returns: <QuerySet [{'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 8, 1)}, {'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 7, 1)}, {'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 6, 1)}, {'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 5, 1)}, {'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 4, 1)}, {'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 3, 1)}, {'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 2, 1)}, {'year': datetime.date(2018, 1, 1), 'month': datetime.date(2018, 1, 1)}, {'year': datetime.date(2017, 1, 1), 'month': datetime.date(2017, 12, 1)}, {'year': datetime.date(2017, 1, 1), 'month': datetime.date(2017, 11, 1)}, {'year': datetime.date(2017, 1, 1), 'month': datetime.date(2017, 10, 1)}, {'year': datetime.date(2017, 1, 1), 'month': datetime.date(2017, 9, 1)}, {'year': datetime.date(2017, 1, 1), 'month': datetime.date(2017, 8, 1)}]> I have the feeling I'm miles away from the desired result..
3b23990a415b1b34f7fcb677fa45b7fc3690f166019738ee19a72f360fdb1c99
['8e89493a1c37426da6f17c382f85b97d']
I stumbled upon a simple problem with the positioning of ggplot, I'm going to provide a very simple example, the real problem is much more complex so I'm looking for a reproductive solution, if possible in the ggplot environment. names <- c("a","b","c","d") days <- c(100,50,25,10) dat <- data.frame(name=rep(names,days),date=as.Date(Sys.Date()-sum(days)+1):Sys.Date(),value=rep(days,days)) ggplot(dat,aes(x = date, group = name)) + geom_line(aes(y=value,color=name)) + geom_text(aes(max(date),value,label=value),vjust=0) What I'm looking for is to position the text at the end of each line representing the group which max(date) should accomplish. I tried various group=name possibilitys but couldn't fix this inside ggplot.
f03734be670e3191d58d4bd0981da00e7ef36d22e98647c8a057af619b10828f
['8e97a935c7ec47dca56a9c1f8b326178']
One more column based grid solution with the help of bootstrap. Here you can adjust the column widths by using the Grid system Fiddle is here if you want to play with. $(function(){ $.fn.itemify = function(update){ var $t = $(this); if ($t.data('itemify') && update!==true) return this; var options = { col:'.col', item:'.item' }, items = $t.find(options.item), col_count = 0, fn = function(){ var cols = $t.find(options.col+':visible'); if( cols.length == col_count ) return; console.log(cols.length, col_count); col_count = cols.length; $t.find(options.col).empty(); items.each(function(i, t){ shortest(cols).append(t); }); }, shortest = function(cols){ var a = 0, h = -1; cols.each(function(i,t){ if( $(t).height() < h || h==-1 ) { h = $(t).height(); a = i; } //console.log( a, b, h, $(this).height() ); }); return cols.eq(a); }; $(window).unbind('resize', fn).bind('resize', fn); fn(); return this.data('itemify', 1); }; /* ----- testing - START item + window resizing --*/ var test_items = $('#itemify .item'); $('.test').removeClass('hide').find('button').click(function(){ var col = $('#itemify .col').eq(0).append(test_items), len = $('#itemify .item').length; for( i=0; i<10; i++) col.append( $('<div class="item">'+ ++len +'</div>').height( Math.random()*300+20 ) ); test_items = $('#itemify .item'); test(); $('#itemify').itemify(true); $('html, body').animate({ scrollTop: $(document).height() }, 100); }); function test(){ $('.test .txt').text($('#itemify .item').length + ' items'); $('#itemify .item').each(function(){ var $t = $(this); if( $t.find('textarea').length==0 ) { $t.html( $('<textarea>'+ $t.text() +'</textarea>').height( $t.height()-5 ) ); $t.removeAttr('style').removeClass().addClass('item'); } }); } test(); /* ----- testing - END -- */ /// start itemify $('#itemify').itemify(); }); body { font-family: sans-serif; font-weight: bold; text-align: center; } .container-fluid { padding: 0 !important; } .row#itemify { margin: 0 0 0 15px; } .row .col { padding: 15px 15px 0 0; } .item { margin-bottom: 15px; background-color: #AAA; } .one { height: 170px; } .two { height: 250px; } .three { height: 150px; } .four { height: 250px; } .five { height: 450px; } .six { height: 350px; } .seven { height: 250px; } .eight { height: 200px; } .nine { height: 500px; } /* testing */ .test { position: fixed; bottom: 8px; right: 10px; text-align: right; font-size: 80%; } .item textarea { border: medium none; resize: vertical; min-width: 100%; max-width: 100%; text-align: center; background-color: transparent; } <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="container-fluid"> <div id="itemify" class="row"> <div class="col col-xs-12 col-sm-4 col-md-3 col-lg-2"> <div class="item one">1</div> <div class="item two">2</div> <div class="item three">3</div> <div class="item four">4</div> <div class="item five">5</div> <div class="item six">6</div> <div class="item seven">7</div> <div class="item eight">8</div> <div class="item nine">9</div> <div class="item five">10</div> <!-- more items --> <div class="item six">11</div> <div class="item two">12</div> <div class="item four">13</div> <div class="item eight">14</div> <div class="item three">15</div> <div class="item one">16</div> <div class="item nine">17</div> <div class="item seven">18</div> <div class="item two">19</div> <div class="item eight">20</div> </div> <div class="col col-sm-8 col-md-4 col-lg-2 visible-sm visible-md visible-lg"></div> <div class="col col-md-5 col-lg-3 visible-md visible-lg"></div> <div class="col col-lg-5 visible-lg"></div> </div> </div> <!-- testing --> <div class="test hide"> <div class="txt">txt</div> <button>add 10 items</button> </div>
5baa1c1ec4646f4a4c0791c89433ca2050997c432234a1c3aba3f6642aa0eb95
['8e97a935c7ec47dca56a9c1f8b326178']
HTML imports or Webcomponents is a new way to do this completely at client side using HTML, JS and CSS. Write a component and reuse it in every page. But it uses ShadowDom, means not search indexable yet. <link rel="import" href="header-banner.html"> <!-- use this in body --> <header-banner></header-banner>
1dfabac0cf7c5496774ba063c2d650068af0de519ed1cca542a0601acf84cfd1
['8e9d9d41c3424bf1ba7f5ae7dd295cf0']
The book's cover is "People Can't Drive You Crazy If You Don't Give Them The Keys" but the content of the book is more about changing yourself and your perceptions and attitude and more. TOC snapshot, Part 1: Stuck in a Crazy World, Part 2: Changing Someone Else, Part 3: Changing Yourself, Part 4: Changing Your Environment, Part 5: Putting It Into Practice. BTW... Really good book.
839762736b945a21c09e9f43c6a4f42a07f2dcc9a0ba2bce509bf1ba5124232e
['8e9d9d41c3424bf1ba7f5ae7dd295cf0']
I have 7 PC with Ubuntu 14.04 on them. I want one PC be like server (i have lampp on this and it works but only on that PC), I want all to conect together using switch no router. So they can acces server computer. ---PC1 ----PC2 SERVER ------------ SWITCH ------------- -----PC3 ----PC4 ---PC5 -PC6 and help is very useful!
8109ea2abae36ecb07bd0d445ebab59070a35db60eb8a65eaff377cbc427a93d
['8ea5e48d92644392b477d9a9ef858825']
I was Passing a this JSON http://www.mocky.io/v2/5cacde192f000078003a93bb i was trying to print a just a category_name I'm not able to get the data list , when i pass the object with out the data list just like http://www.mocky.io/v2/5cb859344c0000092ed3d4df private Category_name category_name; public Category_name getCategoryName() { return category_name; } } public class Category_name { @SerializedName("category_name") public String name; public String getName() { return name; } }```` i can access that through the NewAdapter.java with the following code @Override public void onBindViewHolder(NewsViewHolder holder, int position) { Log.e("Its coming","NewAdapter"); ApiObject apiObject = apiObjectList.get(position); holder.title.setText(apiObject.getCategoryName().getName()); } with the same code I'm not able to get the data list @SerializedName("data") public List<Data> data; public List<Data> getData() { return data; } public class Data { @SerializedName("details") private Category_name category_name; public Category_name getCategoryName() { return category_name; } } public class Category_name { @SerializedName("category_name") public String name; public String getName() { return name; } } @Override public void onBindViewHolder(NewsViewHolder holder, int position) { Log.e("Its coming","NewAdapter"); ApiObject apiObject = apiObjectList.get(position); holder.title.setText(apiObject.getData().getCategoryName().getName()); } I'm not able to access the getCategoryName(); Please help thanks in advance
510dfd6b9dce1b048f36b99be148d4b5b2ef0bb62b1ec783c1522890c21799ed
['8ea5e48d92644392b477d9a9ef858825']
I have used the following code to get the network location . With this code I'm getting the location in android 7.0 and below . but above android 8.0 and above its telling to turn on the GPS Is there is any changes in the location settings locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationListener = new LocationListener() { @Override public void onLocationChanged(Location location) { } @Override public void onStatusChanged(String provider, int status, Bundle extras) { } @Override public void onProviderEnabled(String provider) { } @Override public void onProviderDisabled(String provider) { Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivity(intent); } }; if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.M) { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { requestPermissions(new String[]{ Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.INTERNET },10); return; } } else { configureButton(); } } private void configureButton() { button.setOnClickListener(new View.OnClickListener() { @SuppressLint("MissingPermission") @Override public void onClick(View v) { locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 3000, 0, locationListener); } }); }
cbaacec1a3ae6a8667452f8b44dc06f296ba032ae4f80e6d730146ce6677174f
['8eb0f58ebee94c5aa3511aea0ac9b24f']
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" app:srcCompat="@mipmap/back" android:layout_centerVertical="true" android:paddingLeft="@dimen/_10sdp" android:id="@+id/imageView4"/> <in.mobilepedia.com.gicgwaliarincubationcentre.util.TextViewNormal android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Document Upload" android:layout_toRightOf="@+id/imageView4" android:id="@+id/txtDocumentUpload" android:textColor="@color/white" android:layout_marginLeft="@dimen/_10sdp" android:textSize="@dimen/_18sdp" android:layout_centerVertical="true"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" app:srcCompat="@mipmap/option" android:id="@+id/imageView5" android:layout_marginRight="@dimen/_10sdp" android:layout_alignParentRight="true" android:layout_centerVertical="true"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" app:srcCompat="@mipmap/upload_white" android:layout_marginRight="@dimen/_10sdp" android:id="@+id/imageView6" android:layout_toLeftOf="@+id/imageView5" android:layout_centerVertical="true"/> </RelativeLayout>
b63746041bbc99f85aedaa2c26051bf3b781b62f66cb15182237adec3000624f
['8eb0f58ebee94c5aa3511aea0ac9b24f']
implementation 'com.android.support:appcompat-v7:27.0.0' implementation 'com.android.support:support-v4:27.0.0' implementation 'com.android.support:design:27.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.intuit.sdp:sdp-android:1.0.4' implementation 'com.android.volley:volley:1.1.1' implementation 'com.android.support:cardview-v7:27.0.0' implementation 'com.android.support:recyclerview-v7:27.0.0'
3b9469de7f8f92188495b90a80383247ba8a9bf6d4d7e0ca05cde012e8e118fe
['8ed3b7f459e74f78bcfafe46b2292386']
In my composer.json I have the following: "repositories": [ { "type": "package", "package": { "name": "aaemnnosttv/wordpress-core-phpunit-includes", "type": "wordpress-tests-core", "version": "5.0.2", "source": { "type": "svn", "url": "https://develop.svn.wordpress.org/", "reference": "tags/5.0.2/tests/phpunit/includes/" }, "require": { "aaemnnosttv/wordpress-tests-core-installer": "~0.1" } } } ], "require": { "aaemnnosttv/wordpress-core-phpunit-includes": "5.0.2" } Unfortunately I have to repeat myself in specifying the version of the package. Once in the "version" line, once in the "reference" line and once in the "aaemnnosttv/wordpress-core-phpunit-includes" line. Is there a way of using a composer variable so that I don't have to repeat myself?
fd8a0759fcf1e5999f464926cba73e459eb3ae056037cbe6751c1611d5a107c4
['8ed3b7f459e74f78bcfafe46b2292386']
I am thinking of having a CQRS architecture for my project. This means having a read and a write database and an update process to keep both databases in sync. Since I am going to update the read (elasticsearch) database anyway after each command, I wonder: what is the use of having a write database at all?
2f06e4510b0c00173763a1070037ccf69e95b2c119db7be7afb89a95ba192013
['8edd899eb1f04a01b4b6e648185b11b5']
Here is a blog post describing how to get HTML from a url using the Java SDK, or Apache Commons HttpClient. Once you get the HTML, there is lots you can do to it. Extract the Text from the Markup Extract Links Change Links Collect Email Addresses Collect Images Add Syntax Highlighting Diff Two Sources READ HTML WITH JAVA – THEN 7 FUN THINGS TO DO TO IT
f564663ddbe3b2eb5be0770b2673df9bf81999c0ddcd6225c21fc9e7a4340e93
['8edd899eb1f04a01b4b6e648185b11b5']
@Ingo I want to clone from SD card to virtual disk without removing the SD card from the Raspi, like the SD Card Copier does. So I can easily backup one or several Raspis without the need of many SD cards. I should remove "clone the system **from** a virtual disk" in the question, because it is confusing.
9ac77a0fec896727c93eb204c9463db74da679c80133e8ff6b05c4ea00d1be0d
['8ee213a2caa343f3a11bada34d1a515f']
Um, I've played mabinogi for a while now, and I'm just wondering, I'm lvl 61 but still have a brown box around my talent. Shouldn't it be silvery? My talent is <PERSON>, and shouldn't I have the title of "Apprentice Fighter" instead of "Naive Fighter"? I hope someone can explain this for me. Thank you very much for your time ~
1d207fe73bd339c69fbbd4d78be920155d4a5ccfcce917c15438cbfc2877bfab
['8ee213a2caa343f3a11bada34d1a515f']
You have two main options. A) You can set up Video_Played as a goal. This would give you a conversion rate for the Video_Played event. B) Set up a Google Sheet with the Google Analytics add on. With this create two reports, one with the total users during the period, and one with the total events during the period. Create a third sheet for workings, and then calculate the specific 'event rate' for the event of interest. https://developers.google.com/analytics/solutions/google-analytics-spreadsheet-add-on
cf1fee2bcd946da7594872a9d224c370413af1b3a2178eb0801e34936778c370
['8ee8db589f804a2abfaba8bde6f7f8b6']
If you don't want to do it with IDs or with inline-styling, there is a way I would call a hack. In MainContent.js add className attribute to the component as follows: <Jumbotron className="jumbotron"> And in MainContent.css add !important in the statement you want to override other stylings: .Container { margin-bottom: 0px; } .Jumbotron { margin-bottom: 0px !important; } Unless you override like this, margin-bottom: 2rem from node_modules/bootstrap/dist/css/bootstrap.css is used.
dd1b24bb3866678c5921c6593e30e79eb5c6fe72e4c781c158fbeef3718ee211
['8ee8db589f804a2abfaba8bde6f7f8b6']
I'm trying to serve multiple audio files in the node.js server, but the server sometimes fails when multiple clients try to access. How can I remedy this? express = require('express'); const http = require('http'); const path = require('path'); const fs = require('fs'); const app = express(); app.get('/', function (request, response) { let fpath = base_dir + filenames[getIndex(filenames.length)]; let filestream = fs.createReadStream(fpath); var d = new Date(); filestream.on('open', function() { let stats = fs.statSync(fpath); let fileSizeInBytes = stats["size"]; response.writeHead(200, { "Accept-Ranges": "bytes", 'Content-Type': 'audio/mpeg', 'Content-Length': fileSizeInBytes}); filestream.pipe(response); }); }) app.listen(3000, function () { console.log('Audio file provider listening on port 3000'); })
3cb10dd4ad0a16e0bce5412d9e42663856678de46daacaf6e189c27e49d994e1
['8eeaef14872942c49f68f4058f9b587d']
<PERSON> see now what I did is Create a new HTML file and new .htacess file in the pub folder and older one I changed the name to index.old and htacess.old, so now when someone type this url https://www.marketplace.jawadditaksal.org/pub/ it will redirect to main index website. it is fine now?
dc867fe2e23cfef998b80708312e0aea1feb5cc80401a0a1115b26fa82c6d2ba
['8eeaef14872942c49f68f4058f9b587d']
I just want to reiterate that the precedence of Dr. Seuss Enterprises v. Penguin Books USA, Inc. establishes that in order to qualify for the parody fair use exception, one needs to be parodying that item which for which you're claiming the exception. Use in a parody of something else doesn't necessarily count. -- Additionally, the fact that you would need to sue to enjoin someone against a parody claim does not signify: for *any* copyright, trademark or personal rights claims, they would need to sue to get relief. It's a civil, not criminal, claim. Parody is not special in that regards.
f188579f139180ba8227241ccb6a33392c39f19db2fa42a711ca613f9259b646
['8ef89d03d80b4f93863c3bc2752a9baa']
You just need to remove max_index from if statement otherwise it will add up every student. int max = 0; String max_index = new String(); for (int i = 0; i < 5; i++) { System.out.println((i + 1) + "\t" + score[i]); if (score[i] > max && score[i] != 0) { max = score[i]; max_index = "student " + String.valueOf(i + 1) + " "; } else if (score[i] == max && score[i] != 0) { max_index = max_index + "student " + String.valueOf(i + 1) + " "; } }
f181a840bf1a7106635c3b0b1dc45d0b247c5ccf861d362850ad7b496cb283f2
['8ef89d03d80b4f93863c3bc2752a9baa']
Try this code sample, use this as an example As you can't show your code, hopefully, this works for you int firstarray[][] = {{20, 0, 10, 10, 0, 20}, {20, 0, 10, 10, 0, 20}, {20, 0, 10, 10, 0, 20}, {20, 0, 10, 10, 0, 20}, {20, 0, 10, 10, 0, 20}, {20, 0, 10, 10, 0, 20}}; int secondarray[][] = {{0, 10, 10, 0}, {0, 10, 10, 0}, {0, 10, 10, 0}, {0, 10, 10, 0}}; /* Create new 2d array to store the multiplication result using the original arrays' lengths on row and column respectively. */ int [][] resultArray = new int[firstarray.length][secondarray[0].length]; /* Loop through each and get the product, then sum up and store the value */ for (int i = 0; i < firstarray.length; i++) { for (int j = 0; j < secondarray[0].length; j++) { for (int k = 0; k < firstarray[0].length; k++) { resultArray[i][j] += firstarray[i][k] * secondarray[k][j]; } } } /* Show the result */ display(resultArray);
303cefb01b0defb16099f4a903f484aa00d1195406feac36b21b56562a20b5e1
['8ef9b9458313436c80bcbb4054063216']
I'm new to Pact and I am trying to verify a pact on provider side using pact-python but some matching rules are getting ignored. WARN: Ignoring unsupported matching rules {"$.num_issues"=>{"matchers"=>[{"match"=>"integer"}], "combine"=>"AND"}, "$.error"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[0].issue_id"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[0].msg"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[0].similar_fix_found"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[1].issue_id"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[1].msg"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}, "$.response[1].similar_fix_found"=>{"matchers"=>[{"match"=>"type"}], "combine"=>"AND"}} for path ['body'] Consumer is Java based API and Provider is a Python based API. "body": { "$.num_issues": { "matchers": [ { "match": "integer" } ], "combine": "AND" }, "$.error": { "matchers": [ { "match": "type" } ], "combine": "AND" }, "$.response[0].issue_id": { "matchers": [ { "match": "type" } ], "combine": "AND" }, "$.response[0].msg": { "matchers": [ { "match": "type" } ], "combine": "AND" }, "$.response[0].similar_fix_found": { "matchers": [ { "match": "type" } ], "combine": "AND" }, "$.response[1].issue_id": { "matchers": [ { "match": "type" } ], "combine": "AND" }, "$.response[1].msg": { "matchers": [ { "match": "type" } ], "combine": "AND" }, "$.response[1].similar_fix_found": { "matchers": [ { "match": "type" } ], "combine": "AND" } } } } } ], "metadata": { "pact-specification": { "version": "3.0.0" } } Changing the pact-specification version to 2.0.0 by hand also didn't work as required. Can anyone suggest something..?
5a40a89386a51294de7f7c3fcd3376aa062502dd0d56c2cb760cd6bf31abd39d
['8ef9b9458313436c80bcbb4054063216']
I'm trying to apply contract testing on an POST API(Microservice). I've written the consumer side test cases and the pact is generated and now I'm trying to verify the pact on provider side using pact-python. But I cannot see any option to enter the input body payload for the POST call to the API. So far I have this pact-verifier --provider-base-url=https://localhost:14001/api/v1/htf --pact-url=howToSolve-howToFix.json I also tried creating the provider state app using flask but found no option for entering input body payload. Note : Have to use python only!
9d0b4e1b73325cb8270e8568d2041616401e371379d56cc4a689f1b9e4759b7d
['8f1ab2113cdd4d7e9a4c0855951aecef']
Considering the following agda module signature: module EqList {a ℓ} {A : Set a} {_≈_ : Rel A ℓ} (eq≈ : IsEquivalence _≈_) where We can define the membership in a list, the list inclusion and the list equivalence: _∈_ : REL A (List A) _ _∈_ x = Any (x ≈_) _⊑_ : Rel (List A) _ _⊑_ = _⊆_ on flip _∈_ _≋_ : Rel (List A) _ _≋_ = _⊑_ -[ _×_ ]- flip _⊑_ We can then proceed to prove that this last relation is indeed an equivalence relation: isEq≋ : IsEquivalence _≋_ isEq≋ = record { refl = id , id ; sym = swap ; trans = zip (λ f g → g ∘ f) λ f g → f ∘ g } The proof of transitivity is what makes my question arise. The previous definition is accepted by <PERSON> while the following is rejected: trans = zip (flip _∘_) _∘_ The error is as follows: ({x : A} → Any (_≈_ x) i → Any (_≈_ x) j) != ((x : A) → Any (_≈_ x) j) because one is an implicit function type and the other is an explicit function type when checking that the expression _∘_ has type (x : j ⊑ k) (y : i ⊑ j) → i ⊑ k While this error feels weird, because both proofs should be equivalent (replacing the expression f by the expression λ x → f x should always yield the same result) I can somewhat understand why it behaves this way : there is intern trouble as to how to instantiate the various implicit arguments of _∘_. But this explanation is only intuitive and not very conclusive, so my question is the following: Can someone explain in details why the typechecker succeeds in the first case and not in the second ? As a side note, here is the header of the module, in order for this example to be self contained: open import Relation.Binary.Core open import Data.List hiding (zip) open import Data.List.Any open import Relation.Unary using (_⊆_) open import Function open import Data.Product As a second side note, I am aware that a similar question has already been answered: How to get around the implicit vs explicit function type error? But said answer does not contain any deep explanation about this surprising behavior.
38acb41f07361db6e3f34b941a56b5bcd0b55370655806c8a942de47bc680317
['8f1ab2113cdd4d7e9a4c0855951aecef']
Your definitions seem to imply that, in ∈-chop there are no possible value for τ which can be seen as follows: ∈-chop : ∀ {Γ τ ι} → weaken τ ∈ Γ , τ' at suc ι → τ ∈ Γ at ι ∈-chop {τ = ()} This does not directly answer your question but it's probably not the indented behavior which could ultimately solve your problem.
1e80455f263a04aa8e35afec9752d33961e68d24216980d9af719780872e2216
['8f1ffd0473d4472d8ad283323267bd13']
I'm having trouble with my Form in c++. The form crashes because of my while loop. The while loop is needed for checking the output it receives from an external device. it is actually a log application which continuously prints the data it receives from the device, a real-time log. I'm using Visual Studio 2013. I have 1 .cpp and 1 header file. The header file only includes the method for running the form. In the .cpp file, the function which performs the getting and checking of file is in the "Connect" button event. I also have a disconnect button which obviously disconnects the connection between the form and external device. I'm connecting it via bluetooth. It perfectly receives the output and exactly prints what it needs to print. The only problem is that, I cannot click the disconnect button anymore because it freezes. This is my code for the GetBluetoothOutput: void GetBluetoothOutput(HANDLE btSerial) { std::map<char, std::string> map = { { 'A', "Unit is moving forward at high speed." }, { 'B', "Unit is moving forward at medium speed." }, { 'C', "Unit is moving forward at low speed." }, { 'D', "Unit is moving backward." }, { 'E', "Turn Left." }}; int previous = 0; while (1) { DWORD dwCommModemStatus; BYTE Byte; DWORD dwBytesTransferred; int retVal; SetCommMask(btSerial, EV_RXCHAR); //receive character event WaitCommEvent(btSerial, &dwCommModemStatus, 0); //wait for character if (dwCommModemStatus & EV_RXCHAR) { ReadFile(btSerial, &Byte, 1, &dwBytesTransferred, 0); //read 1 retVal = Byte; } if (previous != retVal) { previous = retVal; char *getOutput; getOutput = (char*)&retVal; auto find = map.find(*getOutput); if (find != map.end()) { std<IP_ADDRESS><IP_ADDRESS>map<char, std<IP_ADDRESS>string> map = { { 'A', "Unit is moving forward at high speed." }, { 'B', "Unit is moving forward at medium speed." }, { 'C', "Unit is moving forward at low speed." }, { 'D', "Unit is moving backward." }, { 'E', "Turn Left." }}; int previous = 0; while (1) { DWORD dwCommModemStatus; BYTE Byte; DWORD dwBytesTransferred; int retVal; SetCommMask(btSerial, EV_RXCHAR); //receive character event WaitCommEvent(btSerial, &dwCommModemStatus, 0); //wait for character if (dwCommModemStatus & EV_RXCHAR) { ReadFile(btSerial, &Byte, 1, &dwBytesTransferred, 0); //read 1 retVal = Byte; } if (previous != retVal) { previous = retVal; char *getOutput; getOutput = (char*)&retVal; auto find = map.find(*getOutput); if (find != map.end()) { std::string description = find->second; m_LogDisplayBox->Items->Add(gcnew String(description.c_str())); } else { m_LogDisplayBox->Items->Add("Unknown input sent from bluetooth."); } } else { m_LogDisplayBox->Items->Add("............."); } m_LogDisplayBox->Update(); } } This is my code for the Connect button: private: System<IP_ADDRESS>Void ConnectBtnEvent(System<IP_ADDRESS>Object^ sender, System<IP_ADDRESS>EventArgs^ e) { m_DisconnectButton->Enabled = true; m_ConnectButton->Enabled = false; int m_Port = m_PortComboBox->SelectedIndex; int m_BaudRate = m_BaudRateComboBox->SelectedIndex; int data = m_DataComboBox->SelectedIndex; int parity = m_ParityComboBox->SelectedIndex; int stop = m_StopComboBox->SelectedIndex; int flowControl = m_FlowControlComboBox->SelectedIndex; switch (m_BaudRate) { case 0: m_BaudRate = CBR_110; break; case 1: m_BaudRate = CBR_300; break; case 2: m_BaudRate = CBR_600; break; default: m_LogDisplayBox->Items->Add("No \"Baud Rate\" selected."); } switch (data) { case 0: data = 7; break; case 1: data = 8; break; default: m_LogDisplayBox->Items->Add("No \"Data\" selected."); } switch (parity) { case 0: parity = NOPARITY; break; case 1: parity = ODDPARITY; break; case 2: parity = EVENPARITY; break; case 3: parity = MARKPARITY; break; case 4: parity = SPACEPARITY; break; default: m_LogDisplayBox->Items->Add("No \"Parity\" selected."); } switch (stop) { case 0: stop = ONESTOPBIT; break; case 1: stop = ONE5STOPBITS; break; case 2: stop = TWOSTOPBITS; default: m_LogDisplayBox->Items->Add("No \"Stop\" selected."); } HANDLE btSerial = BluetoothInit(m_Port, m_BaudRate, data, stop, parity); if (isConnected){ m_LogDisplayBox->Items->Add("Connection Successful!"); GetBluetoothOutput(btSerial); //This is the method which has the while-loop for continuously reading the outputs from bluetooth. } else{ m_LogDisplayBox->Items->Add("Connection Unsuccessful"); m_DisconnectButton->Enabled = false; m_ConnectButton->Enabled = true; } } I've read that 1 solution is to use multithreading. Does anyone can give other solutions than multithreading because I'm not very familiar with threads. Thank you in advance!
0c3e808a533e02fcb1db30af1a2cd21843e5bf3e425d89ed50a9cb195099e67a
['8f1ffd0473d4472d8ad283323267bd13']
Good day guys! I have this program that checks whether the current password matches a password in the database. Then the new password should update the current password that is in the database. The passwords are converted into md5 structure. Now, all perfectly works except that the database won't update. A MySQLSyntaxErrorException occurs and also the executeUpdate method won't work. Any help will be much appreciated. Thank you in advance! if(!rs.next()){ JOptionPane.showMessageDialog(null, "Please Retype your password."); response.sendRedirect("/Project1/ChangePassword.jsp"); }else{ JOptionPane.showMessageDialog(null, "RESULTSET"); pswrd = rs.getString(1); if(md5CurrentPasswrd.equals(pswrd)){ if(newPassword.equals(confirmPassword)){ digest.update(newPassword.getBytes(), 0, newPassword.length()); md5NewPasswrd = new BigInteger(1, digest.digest()).toString(16); Connection conn2 = null; String conStr = "jdbc:mysql://localhost:3306/chkdb?user=root&password="; conn2 = DriverManager.getConnection(conStr); PreparedStatement prepStmt = conn2.prepareStatement("UPDATE accounts SET password=? /n" + " WHERE password=?"); prepStmt.setString(1,md5NewPasswrd); prepStmt.setString(2,md5CurrentPasswrd); JOptionPane.showMessageDialog(null, "Updated1!"); //The program passes this. prepStmt.executeUpdate(); prepStmt.close(); JOptionPane.showMessageDialog(null, "Updated2!"); //The program does not reach this. response.sendRedirect("/Project1/summary.jsp"); }else{ JOptionPane.showMessageDialog(null, "Passwords did not match!"); response.sendRedirect("/Project1/summary.jsp"); } } }
9358076b013ee80c20e8f38255de90c97cf856b84a7aa91f05af6743e60f602f
['8f283b08268643bd8d89bfcc4cca89db']
Here's what I did and it seems to fix things. One of the options when installing the driver from the nvidia .run file (version 270.26) is whether to install 32bit compatibility libraries. You need to select NO on this if you have a 64 bit system. When I disabled the driver from the repositories and reinstalled this driver without adding 32 bit compatibility support, the performance problems disappeared. (Note if you're doing it this way, you also need to blacklist the noveau kernel module.)
727edcb5fac24407cd1d644bd54f50f418fab2b3486141300845df417feaedfb
['8f283b08268643bd8d89bfcc4cca89db']
I must be missing something.... One transmits at 48 dBm, the other at 33. So you need to add 15 dB to your link budget, which means multiplying the radius by 5, not 2. That's a pretty big antenna! And the gain of a DSN antenna varies with he frequency (not favourably at all in this case), which makes things worse. Also the Curiosity antenna is probably somewhat pointing up, while a cellular antenna will send its signal more sideways. Satellite phones are probably a different story though.
67f7daf2e176d72b1e8ab4377b93ec3e7a4bf34449cbccd11025764d8d58629b
['8f2c465572de482cbfda0ba722920390']
I'm not really understanding where to put function() { return {} } and where not to when it comes to deeply nesting computed properties. By the way, this is in a component! computed: { styles: function() { return { slider: function() { return { height: { cache: false, get: function() { return 'auto'; } }, width: { cache: false, get: function() { return $('#slideshow').width(); } } } } } } }, This is returning undefined. When I get rid of the function() { return {} } inside of the slider index, it returns an object when I do styles.slider.width instead of the get() return. It just shows an object with cache and get as indexes.. Thanks for any help! The reason I'm asking is because I have multiple nested components that involve styling from the parent. Slider, tabs, carousels, etc. So I wanted to organize them like this.
8b14d768181d06228bfeadefbc5e3bc508709d84510568849584f4876f9044ba
['8f2c465572de482cbfda0ba722920390']
Ok so I have two columns in one worksheet. My 3rd worksheet tab has this: In column B: Original Performance NorGrip Gold Blank Disc Gold Blank Disc Truckbed Liner Kit In column C: Grade Grade Dimensions However, I want a list that shows this: Original Performance NorGrip Gold Blank Disc Grade Gold Blank Disc Dimensions And since Truckbed Liner Kit has a blank column to the right, I would rather it not even appear in the list. So this is what I have: =IF(ISBLANK(C2),"",CONCATENATE(B2," - ",C2)) In a random column on that worksheet tab. So I then create a named range group called ProductGroupAttributes And then in worksheet tab 4, I have a data validation list =ProductGroupAttributes However, it puts all the blank columns in since my first formula inserts "" where blank... so it doesn't truly ignore the blank columns. How do I go about doing this?
19570e958381a258813cf59ec2e393914a65b0dadd6bed5d7af89af5cf49c251
['8f399b04ade04781b7a7e7f2f4697be5']
Thank you so much! However, I think that your proof is not true. Because, if $z\in V\otimes W$ and (note that $z\neq 0$) then $z$ has the from $$z = \sum\limits_{i}v_i\otimes w_i$$ where $v_i, \ldots, v_k\in V$ are arbitrary and $w_1, \ldots, w_k\in W$ are lineary independent.
b396d283578a9f2754485da2c94ae0bafedd9086478821a2a3123366dec7b794
['8f399b04ade04781b7a7e7f2f4697be5']
Since $f$ is mono, and $v_1, \ldots, v_k$ are lineary independent, $f(v_1), \ldots, f(v_k)$ are also lineary independent. So, applying Lemma 2, from $\sum\limits_{i}f(v_i)\otimes g(w_i) = 0,$ we conculde that $g(w_i) = 0.$ On the other hand, $g$ is monno, so we have $w_i = 0,$ for all $i.$ This leads to $z = 0.$
44acaae836d5633b43eb5e853daf3a8e1baa3d6993e31fa1950fddec1e27a1a9
['8f4cb76237cd4b3090a4801913c051c5']
I am trying to do an integration test for an Ember component that requires a model as input. I have mock data, but I cannot pass it into the component directly because the model includes computed properties and other customizations that EmberData normally handles under the hood. However, I cannot figure out how to inject the store into the test to convert my mock data into an Ember model. I've tried a few different approaches, none of which work: Ember.inject.service('store'); this.get('store') var store = this.container.lookup('service:store'); Ember.getOwner(this).lookup("service:store"); None of these actually work. I'm using Ember v2.9.1. The code for my integration test is below. import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('host-pod', 'Integration | Component | host-pod', { integration: true }); test('it renders', function(assert) { ... code to get store ... this.set('mockModel', store.normalize('model', mockModel)); this.render(hbs`{{component model=mockModel show='all' mode='grouped'}}`); assert.equal(this.$().length, 1); }); var mockModel = { ... }
b47632d8996dc8332ed785783a790c8137e41d9d2e8f157258439de645dde3fe
['8f4cb76237cd4b3090a4801913c051c5']
Is it possible to run docker-compose up in such a way that it will only build if the image isn't present in the repository? I'm working on a test scenario that will run in two different environments: locally on a laptop, and on a server as part of test automation. My docker-compose file looks something like this: services: my-service1: build: "./local-repo1" image: "image1" my-service2: build: "./local-repo2" image: "image2" ... If I run it locally where the local-repo directories exist it runs fine. If I try to run it on the server where it instead pulls from a docker repository it complains that it cannot find the build path. If I take out the build property it runs fine on the server, but then it won't run locally unless I build the images beforehand. Is there a way to make it only try to build if the image doesn't already exist? If not I can try some workarounds, but I'd prefer to use just one docker-compose file that handles each case.
4d0e98d8d8eca96235b3236f6620c55b4ca705a27147abc9ab89e97ca4f68bba
['8f555c2c1abc40c7b359c5ecc77e3e37']
woooohoo! I could finally figure out the answer thanks to another post on stackoverflow!! It was stupidest mistake I have ever made I think. In my context xml, element "context" should have been with uppercase "C" i.e. "Context"!! Thanks to guys in this link! Trouble Deploying WAR file. Failed to start component []
250ed3955df5c1152b1291f9d7732a4a780190423d67f5802997037763cbe7c4
['8f555c2c1abc40c7b359c5ecc77e3e37']
I faced the same issue just now while upgrading my project from spring 3 to 4.1.6. A little background for reference, just in case if it helps anyone running into same issue===> First, it prompted me with error for mappingJacksonconverter vs mappingJackson2converter since the former doesn't exist anymore with spring 4. Once I changed those references in code, I ran into issue with my dispatcher servlet since it had xsd definitions from spring 3 support. Once that's corrected, my last step in journey was this error which you all faced as well. My solution: I had older versions of following jars: jackson-annotations, jackson-core, jackson-databind, jackson-core-asl, jackson-mapper-asl I upgraded first 3 jars to 2.10.0.pr1 release and last 2 to 1.9.13 release. I also had one more older jar i.e.com.fasterxml.jackson.core.jar which I had to remove as well. Anyways, as error suggested this was the key reason for the mismatch (Like <PERSON> said in comment prior to mine) I think only last paragraph is important from this particular question point of view, but I am hoping my narration of issues faced leading up to that may help someone saving 4-5 hrs :) Cheers, folks!
957f6b35c452aa9a768b759d95b98f65fa4b0df426a8b797685a55fb00f6da93
['8f6a7b73326749699c5d5e151bc05946']
If you are given a list of documents, with strings in the documents, how do you go about and search from the documents and return the list of documents that contains the string that you were searching for? How would I go about implementing a program in Python or C for this problem statement? I've considered grep, but I'm not sure how implementing that inside of a native Python/C application would work. Thought process at the moment is simply to parse through documents in a loop, then parse through all strings, etc., but it seems a little inefficient. Any help appreciated.
7ad51c7fa1f9c41ef4b4c231eeb1805977cbb07bb333b722c78c91094a00395a
['8f6a7b73326749699c5d5e151bc05946']
I'm running a basic machine learning tutorial code snippet (which compiles properly on the computer of the person teaching), and I can't seem to find what's wrong. I understand the question has been 'answered', but I can't seem to understand the answer. DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample. DeprecationWarning) [0] Apparently I just use X.reshape(-1, 1) or X.reshape(1, -1), but I'm not sure exactly how either work in a general situation, or if they should be placed before or after I plot/for the data. Here's my source code. Any help is much appreciated :-) import numpy as np import matplotlib.pyplot as plt from matplotlib import style style.use("ggplot") from sklearn import svm x = [1, 5, 1.5, 8, 1, 9] y = [2, 8, 1.8, 8, 0.6, 11] plt.scatter(x,y) plt.show() X = np.array([[1,2], [5,8], [1.5,1.8], [8,8], [1,0.6], [9,11]]) y = [0,1,0,1,0,1] clf = svm.SVC(kernel='linear', C = 1.0) clf.fit(X,y) print(clf.predict([0.58,0.76]))
3a227b51af8e187a45069ba4fa9659d6aad8e4a0df62b9879425c2b2f148199b
['8f6c5eaa307a47e793d89b1353e14cdc']
Let's assume I have a series of functions that work on a sequence, and I want to use them together in the following fashion: let meanAndStandardDeviation data = let m = mean data let sd = standardDeviation data (m, sd) The code above is going to enumerate the sequence twice. I am interested in a function that will give the same result but enumerate the sequence only once. This function will be something like this: magicFunction (mean, standardDeviation) data where the input is a tuple of functions and a sequence and the ouput is the same with the function above. Is this possible if the functions mean and stadardDeviation are black boxes and I cannot change their implementation? If I wrote mean and standardDeviation myself, is there a way to make them work together? Maybe somehow making them keep yielding the input to the next function and hand over the result when they are done?
f7c4d9052ea3d4864e47403d31f392230d518fb657f9289680b655cfe28f1aed
['8f6c5eaa307a47e793d89b1353e14cdc']
I want to do the following: add a switch in my Web.config and whenever it is turned on, any value coming from a .resx file will appear together with the name of the .resx file it came from. This is mainly for debugging purposes. My current understanding is that the way to do this is create a custom T4 template, and use it instead of the PublicResXFileCodeGenerator. I am trying to find a template that does what the PublicResXFileCodeGenerator does, and then build upon that. Is there such a template somewhere in my installation of Visual Studio? If not, can I find such a template from an official source online?
ecd9dc3209ed6230f840fc7006aea1ea357314a7f998ac31a3a8d261b1eeecc1
['8f71b4725d0e4bcea2d2cd9ee3e9588e']
I am a master (international)student in Germany, I will apply Phd in Canada or US. There will be a gap year between my graduation year and entrance year. Now my plan to get reference letter is as follows: One letter from my thesis supervisor. Another two letters from the professor whom I took a class with and got an A. Now I am not sure if any of the professor will remember me after (at least) one year. Surely I got best grade in their exam(oral), but this does not guarantee the chance. The question is, should I made a impression to them, like directly(politely) ask them if I can get a reference letter from them in the future?Or just wait till the application time and sending emails to ask them? Or any other?
2d04c13b7b6d0f50072e2e9c9f4111c72b1f0900f7c9f8342df0e8422215c2ba
['8f71b4725d0e4bcea2d2cd9ee3e9588e']
I created a custom switch control which is working fine. The default functionality is when it is set to 0, It hides the sub-options. This is working fine when the switch control is toggled to 0, but it doesn't work on customizer load. Below is the code for Custom Switch Control Class. class Custom_Customize_Switch_Control extends WP_Customize_Control { /** * Enqueue scripts/styles for the WP custom switch */ public function enqueue() { wp_enqueue_script( 'custom-switch', plugin_url( 'admin/js/custom-switch.js' ), array( 'jquery' ) ); wp_enqueue_style( 'custom-switch', plugin_url( 'admin/css/custom-switch.css' ) ); } protected function render_content() { $val = $this->value(); ?> <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php if( !empty( $this->description ) ) { ?> <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span> <?php } ?> <div class="custom-switch clearfix"> <label class="cb-enable<?php if( $val ) echo ' selected'; ?>"><span><?php echo isset( $this->on_label ) ? esc_attr( $this->on_label ) : 'Yes' ?></span></label> <label class="cb-disable<?php if( !$val ) echo ' selected' ?>"><span><?php echo isset( $this->off_label ) ? esc_attr( $this->off_label ) : 'No' ?></span></label> <input type="hidden" class="checkbox" value="<?php echo esc_attr( $val ); ?>" <?php $this->link(); ?> /> </div> <?php } } Custom Switch Control Class JS (function( $ ) { $(document).on('click', ".cb-enable", function () { var parent = $(this).parents('.custom-switch'); $('.cb-disable', parent).removeClass('selected'); $(this).addClass('selected'); $('.checkbox', parent).attr('value', 1).trigger('change'); }).on('click', ".cb-disable", function () { var parent = $(this).parents('.custom-switch'); $('.cb-enable', parent).removeClass('selected'); $(this).addClass('selected'); $('.checkbox', parent).attr('value', 0).trigger('change'); }); })( jQuery ); Custom Switch Control - Notice Bar $wp_customizer->add_setting( 'cookie-notifications', array( 'default' => 0, 'transport' => 'postMessage' )); $wp_customizer->add_control( new Custom_Customize_Switch_Control( $wp_customizer, 'cookie-notifications', array( 'label' => __( 'Show Notifications', '' ), 'section' => 'custom-notice-bar-section', 'priority' => 0 ))); Custom Switch Control - Notice Bar Fields $wp_customizer->add_setting( 'custom-notifications-text', array( 'default' => __( 'This website uses cookies.', '' ), 'transport' => 'postMessage', 'sanitize_callback' => 'custom_text_sanitization' )); $wp_customizer->add_control( 'custom-notifications-text', array( 'label' => __( 'Notice Content', '' ), 'section' => 'custom-notice-bar-section', 'priority' => 2 )); Customizer.js code jQuery(function ($) { var c = wp.customize; c.bind('ready', function () { c('cookie-notifications', function (control) { control.bind(function (controlValue) { if( controlValue === '1' ) { c.control('amp-wp-notifications-text').activate(); } else { c.control('amp-wp-notifications-text').deactivate(); } }); }); }); });
a51157ceb5d72fdb966324aad3cd12868f3306eab7a5c0e8c85b41291c3757d9
['8f73cf7046904aea8d56993b963b9540']
as a non-Mac expert I am nervous about hacking around with `sudo` - also I have no idea what server it is is trying to contact. If you can tell me how to find that out and block it in a way I can do safely, I'll accept the asnwer!
941022c36d1ffbdd6f72ddd31f039bd3b14e81616a1af610eaf70ced6c1cb2c2
['8f73cf7046904aea8d56993b963b9540']
K5, 15 bytes Very literal: {(+/x%2;%*/x)}/ In action: {(+/x%2;%*/x)}/[0; 24 6] 24 6 {(+/x%2;%*/x)}/[5; 24 6] 1.345817e1 1.345817e1 Unfortunately, this does not work in oK because that interpreter does not currently support projection (currying) of adverbs. Works in the real k5. In oK, it would currently be necessary to wrap the definition in a lambda: {x{(+/x%2;%*/x)}/y}[5; 24 6] 13.4582 13.4582
29254d44b81e6d77eda3a68ae45c623a09c4c0aac46a774bd2d849543f9d1139
['8f788afa1c8e4bcfa34829eb321ab736']
Unless the VM's actually need that much CPU horsepower, I'd very seriously consider dropping them to one or two processors each. When a VM wants to use a processor cycle, all four cores of one of your physical processors have to be ready, which can cause some pain if anything else is going on (dom0 in this case). I'm more familiar with the VMware side of things, but the issue is similar. Try going down to at most two cores per VM, or preferably one. Then see how the response time goes. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005362 http://communities.vmware.com/thread/143348
89881b69e9e3fb9f15ae3ed7332ab5015f9a27b1908411564d1bfdb06346c182
['8f788afa1c8e4bcfa34829eb321ab736']
<PERSON> has it right. Deploy through Group Policy and never look back. I for one prefer using Group Policy Preferences to deploy printers, as the management is a bit easier and can be done entirely from Group Policy Management, without requiring the Print Management MMC to do the printer portion. Whichever way works for you, though. If you're having permission issues specifically, it could be that the clients don't have permissions to add network print drivers because of an improper Group Policy (or local registry) problem. Take a look here (specifically under "Trusted Path" and the "Devices: Prevent users from installing printer drivers" section).
171ee77cf3eb82005fe8c602c4e4d9472eb8d5d33fe54a11f7b876f497e88c29
['8f8ef2e32af045aaae24be3eb2ee3aa8']
So my problem is this. I can remove a record from localstorage proxy just fine the first time. But if I do it again, it gives me an error, where everything in the Store is undefined, like it didnt exist anymore. onTapRemoveKegelReminder: function(button) { console.log(button.getData()); //Find and delete the button and the record var store = Ext.getStore('KegelReminders'); store.load(); store.filter('button_id', button.getData()); var record = store.first(); console.log(record); console.log(button.getData()); console.log('Remove count'+ store.getCount()); if (typeof record !== 'undefined'||record!=null ) { store.remove(record); store.sync(); console.log('removed record correctly') this.trainingCount--; var rmButton = this.getKegelExercises().down('#container-' + button.getData()); this.getKegelExercises().remove(rmButton); } But if I restart my application, and then remove again it works fine. I cant seems to remove more than once without having to restart the application.
3ca2dd6016660fecbc36d57c15f1be0a4707bbcee9e869a284b0eeb48b4c4560
['8f8ef2e32af045aaae24be3eb2ee3aa8']
So I'm testing one of my controller in RSPEC and I'm trying to test the whole update shenanigans. This is what i have in the RSPEC describe 'PUT update' do before :each do @user = Factory(:user,name: "<PERSON>") end context "valid attributes" do it "located the requested @user" do put :update, :id => @user, user: Factory.attributes_for(:user) assigns(:user).should eq(@user) end it "changes @user's attributes" do put :update, :id=> @user.id, user: Factory.attributes_for(:user, name: "<PERSON>") @user.reload @user.name.should eq("Larry Smith") end end And this is what i have in the controller def update #update and save @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[:user]) sign_in @user format.json{render :json => @user ,:status => :created, :location => @user } else format.json { render :json => @user.errors, :status => :unprocessable_entity } end end end So apparently the the @user.reload doesn't really refresh the ActiveRecord, as my errors showed that the name has not been changed at all. Any idea what is wrong?
64736b2816f3795b51292944660a6c8ee7f3be2e11d459ecff30001083868beb
['8f991e3411e84074bad89ad75b50cd1c']
My answer is nearly similar as above just added a break, so if you already get the result then no need to continue the loop. Will be efficient if the array is too large. $cat = 171; $categories_array = array ( "Belts" => array (131), "Headwear" => array (171, 172, 185, 186), "ScarvesAndGloves" => array (166, 173, 184) ); echo getaName($categories_array, $cat); function getaName($array, $searchKey) { $name = ''; foreach($array as $key => $val) { if(in_array($searchKey, $val)){ $name = $key; break; } } return $name; }
4d8063e21f7c59ef8e93eba81b10f13f9ef64c2df56a776e1075f7e51e794a74
['8f991e3411e84074bad89ad75b50cd1c']
Finally I have found the solution after a long struggle from the following link - https://cakephp.lighthouseapp.com/projects/42648/tickets/2464-plugin-using-acl-not-loading-proper-model When I used Auth component, the user controller was not using Cauth.user model. It was loaded using AppModel. But without auth component, it was working properly. So that the correct way of using auth component will be 'Auth' => array ( 'authorize' => array ( 'Actions' => array ( 'actionPath' => 'controllers', 'userModel' => 'Cauth.User', ), ) ), That is the total AppController will be - class AppController extends Controller { public $helpers = array ('Form', 'Time', 'Html', 'Session', 'Js', 'DebugKit.Toolbar'); public $counter = 0; public $components = array ( 'DebugKit.Toolbar', 'RequestHandler', 'Acl', 'Auth' => array ( 'authorize' => array ( 'Actions' => array ( 'actionPath' => 'controllers', 'userModel' => 'Cauth.User', ), ) ), 'Session' ); public function beforeFilter() { //Configure AuthComponent $this->Auth->loginAction = array ('plugin' => 'cauth', 'controller' => 'users', 'action' => 'login'); $this->Auth->logoutRedirect = array ('plugin' => 'cauth', 'controller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array ('plugin' => '', 'controller' => 'pages', 'action' => 'display'); } } And now everything is working fine. Thanks to all.
3346bdf357937013a9245c47edce0361b25c08f7e85cae9e5b3eff36e7f62751
['8f9f90bce80144938bb3b264616c4277']
Если я правильно понимаю. То вам необходимо выполнить запрос сразу на множестве серверов, которые вы добавили в Local Server Groups. Для этого вам необходимо на корневой папке (Local Server Groups) или на любой другой, созданной дополнительно, нажать правую кнопку мышки и выбрать "New Query" ("Новый запрос" на Русском). После этого у вас откроется окно запроса как обычно, но если вы посмотрите на нижнюю часть этого окна, то оно будет красным и слева-снизу будет указано к какому количеству серверов вы подключены. Например "Connected (12/12)". Теперь те запросы что вы будете выполнять в этом окне, будут транслироваться на все сервера и вы получите результаты с каждого из них. Прилагаю скриншот:
74312f0d6d4d785d239d2e671ebbc116930fa422217bcac051b272f853c65d3b
['8f9f90bce80144938bb3b264616c4277']
iMac 27 inch - late 2012, i7 Well, Apple probably won't like this advice but it EASILY worked for me : I use the headphone jack output for audio playback from my iMac (Pro Tools, iTunes, etc) and after upgrading to the iMac from my Mac Pro (early 2008, quad core) physically configured the same way (headphone jack output to my speakers) the iMac would constantly emit a BUZZ shortly after any sound was outputted from it. i.e. : something like a system sound would play, there would be silence, and then after about 10 seconds or so the BUZZ would constantly output. read and tried a few things that were completely useless and weird to even give a try (but I did regardless) - things like : 'zap the PRAM' ... reset the SMC ... switch to 32bit .... all weird, misguided and did not solve the problem. I shut down the iMac, unplugged the power cable from the wall, grabbed a pair of needle nose pliers and then ripped off the GROUND PLUG from the power cable. Plugged it back in, booted back up and SOLVED. Apple's mention of a "ground loop" possibly being the problem in other posts was the best advice I found. They did/would not offer this solution but for me, after working in recording studios for more than 25 years now and experiencing MANY types of grounding issues with regard to BUZZ in the audio signal - it led me to just rip that ground plug off and move forward. As a professional I cannot profess to know that the possible negative implications might be from having a non-grounded iMac but let me just say that this is not the first time that I have done this with a computer or any type of gear for that matter to just basically "move on". Let's see if Apple allows this post. Believe me - try it! If it doesn't help then make sure that you have a replacement IEC power cable (the one that has a female 3-pronged end and a male 3-pronged end) to swap out to if not successful.
9f3c21a32799c5abbd4badde428586f76745ee0b2280592010ef650af629f0c3
['8fa46ede9c0346bf88430b1986ec1945']
I have three resources resp. VM types I want to add. For each resource I want to run a remote-exec and place some files using the corresponding provisioner. As I don't want to have the provisioners repeated in each resource, I thought about writing a (resp. another) module. I created a module which looks like that: variable "cicd-user" { default = [ "useradd cicd-user", "echo cicd-user: | /usr/sbin/chpasswd", "su - cicd-user -c \"mkdir /home/cicd-user/.ssh/\"", "su - cicd-user -c \"touch /home/cicd-user/.ssh/authorized_keys\"", "su - cicd-user -c \"chmod 700 /home/cicd-user/.ssh/\"", "su - cicd-user -c \"chmod 600 /home/cicd-user/.ssh/authorized_keys\"", ] } variable "sudoers_content" { default = "cicd-user ALL=(ALL) NOPASSWD: ALL" } variable "sudoers_destination" { default = "/etc/sudoers.d/cicd" } The main.tf has the following: module "provisioner_info" { source = "./provisioner_info" } ... resource "vsphere_virtual_machine" "web" { ... provisioner "remote-exec" { inline = module.provisioner_info.cicd-user } provisioner "file" { content = module.provisioner_info.sudoers_content destination = module.provisioner_info.sudoers_destination } ... That doesn't work as I would have expected that, I get the following error: terraform plan Error: Unsupported attribute on main.tf line 81, in resource "vsphere_virtual_machine" "web": 81: inline = module.provisioner_info.cicd-user This object does not have an attribute named "cicd-user". Can someone tell me, what I'm doing wrong? Do I misuse the module functionality?
3aba8d840cd925a15f8ad0d6f421ddb128d41845e103a1f47f165cfe1bce5025
['8fa46ede9c0346bf88430b1986ec1945']
A friend of mine showed me how to solve this problem: SELECT l.id AS locationid, l.locationname, count(username) AS count, GROUP_CONCAT(username SEPARATOR ", ") AS users FROM locations l LEFT JOIN votes v ON v.location_id = l.id AND v.date = CURDATE() LEFT JOIN users u ON v.user_id = u.id GROUP BY locationname ORDER BY count DESC;
7c417b9555aa0b16a5139d267b4f3919d76bc27c343b5750385329e8d1915f2a
['8fab54ba69254b2fbfd4ab0832e2ef49']
I had similar, with D7 and D2010 apps, and suggest you look at it the other way round - move to MySQL 5.1 or later and test your D7 apps to confirm they work. (If they don't, add newer version of libmysql.dll (e.g. for MySQL v5.1.8), and make SURE you are not using the "old" libmysql in the windows path (rename all other files and put the new libmysql in your app exe directory. HTH <PERSON>
c6c3a9838c99a10695c9334d1da4905914bdfc661d324d814fdd71b83d8d65e0
['8fab54ba69254b2fbfd4ab0832e2ef49']
I find the best way to return an array from php to Ajax (jscript): on the php side: echo json_encode($myArray); on the javascript side (e.g. myAjax.responseText) replyVal = JSON.parse(myAjax.responseText); To send arrays TO php from javascript, use the matching JSON.stringify() to send and php json_decode() to receive
2d53801518c8f702c023201de4ee4c3374a404beba4da3beec6d735781d9e8f8
['8fb10b0ff1384448a6100a2ba8752a95']
Thanks for your answer! I tried a couple of objects like dataframes but was not lucky... I must admit that I haven't tried openpyxl yet but finally succeeded by writing a function which writes my data from a csv to an AMPL format-like file (.dat). Not very elegant but it works :)
fd383322c9b04bdb1dfe262271d530118052bd2533a414aa0f2ef9305cf7947b
['8fb10b0ff1384448a6100a2ba8752a95']
I have an abstract model in Pyomo which I need to run a couple of times with changing data which is why I'd like to have some easy data import from csv or xls. I tried the DataPortal as well as directly writing a data file but don't succeed and would appreciate your help!! DataPortal I am well aware of the site https://github.com/Pyomo/pyomo/blob/master/examples/doc/pyomobook/attic/ref-dataportal/dataportal_tab.py and tried to just implement it accordingly - without success :/ I try to import 'timespan' as a set. I have a column called 'timespan' in the csv/xls file which goes from 0 to 23. Import from xlsx: data = DataPortal() data.load(filename='Operational_Data.xlsx', range='timespan', set=dispatch.timespan) data.load(filename='Operational_Data.xlsx', range=('D2:D49'), param='elload', index=dispatch.timespan) instance = dispatch.create_instance(data) Neither of both range options (column title and excel range) work, timespan stays empty. Import from csv: data.load(filename='Operational_Data.csv', set='timespan') Importing from csv only imports tuples such that it includes neighbouring columns into 'timespan' which, however, has only one dimension. Directly via data.dat file: load Operational_Data.csv using=csv format=set : timespan=[timespan]; Throws OSError: Must specify at least one set or parameter name that will be loaded. How can I import data for my abstract pyomo model? Thanks! <PERSON>
0f1e1906e25c2dee1a18524b21b7b08a3f5ba879b06e6a6eb59fb40580b8c378
['8fc8119220124632bad9cd81972d9bf2']
@ Inventor Локально все работает нормально, единственное, в консоли : Not Found: /favicon.ico [24/Aug/2020 17:02:31] "GET /favicon.ico HTTP/1.1" 404 3765 [24/Aug/2020 17:02:35] "GET /tasks/list HTTP/1.1" 301 0 [24/Aug/2020 17:02:35] "GET /tasks/list/ HTTP/1.1" 200 2636 [24/Aug/2020 17:02:40] "GET /accounts/logout/ HTTP/1.1" 200 1447
d81afaeec4a0e7d7fca01bf56b09cc2db5eafc56e725954da3a5e4aa4120256b
['8fc8119220124632bad9cd81972d9bf2']
Пытаюсь добавит теги в приложение через shell Есть созданные таски. >>> from tasks.models import TodoItem >>> t = TodoItem.objects.get(pk=11) >>> t.tags.all() Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: 'tuple' object has no attribute 'all' >>> Может быть, ошибка синтаксиса в модели? models.py from django.db import models from django.urls import reverse from django.contrib.auth.models import User from taggit.managers import TaggableManager class TodoItem(models.Model): tags = TaggableManager(), PRIORITY_HIGH = 1 PRIORITY_MEDIUM = 2 PRIORITY_LOW = 3 PRIORITY_CHOICES = [ (PRIORITY_HIGH, "Высокий приоритет"), (PRIORITY_MEDIUM, "Средний приоритет"), (PRIORITY_LOW, "Низкий приоритет"), ] description = models.CharField(max_length=64) is_completed = models.BooleanField("выполнено", default=False) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) owner = models.ForeignKey( User, on_delete=models.CASCADE, related_name="tasks") priority = models.IntegerField( "Приоритет", choices=PRIORITY_CHOICES, default=PRIORITY_MEDIUM ) def __str__(self): return self.description.lower() class Meta: ordering = ("-created",) def get_absolute_url(self): return reverse("tasks:details", args=[self.pk]) class Widget(models.Model): name = models.CharField(max_length=50)
16b452941309b71358e081b537d0c162c562b96331d67cd0db4d5ce79df461c4
['8fd49433650a43bba0b11336cc2a683d']
I can not add the jpanel I have over ride to the frame. it is not displaying it. I have add it by get content pane but it doesn't work.what should I do. where is my problem. thank you in advance import java.awt.*; import javax.swing.*; public class BigBang { JFrame worldFrame; WorldPanel worldPanel; int worldX=800; int worldY=600; public void draw(){ worldFrame=new JFrame("world"); worldFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); worldPanel=new WorldPanel(new Dimension(800,600)); worldFrame.setLayout(new FlowLayout()); worldFrame.setSize(worldX,worldY); worldFrame.getContentPane().add(worldPanel); System.out.println("done"); worldFrame.setVisible(true); } public static void main(String[] args) { BigBang b=new <PERSON>(); b.draw(); } } class WorldPanel extends JPanel{ private static final long serialVersionUID = 1L; Graphics graphic; WorldPanel(Dimension d){ setPreferredSize(d); } public void paintComponents(Graphics g) { super.paintComponents(g); System.out.println("it is in"); graphic=g; setBackground(Color.black); int firstx=60; int firsty=90; g.setColor(Color.white); g.fillOval(firstx, firsty, 30, 30); System.out.println("here"); } }
6189b9d4b4a24e0119efaf1c65d01406e37bd4ea508b3dfd22b2261d0f6926c8
['8fd49433650a43bba0b11336cc2a683d']
I have a problem on priority of contents in a web page. I mean I want one component to be in front of another component. here I want my drop down menu in front of other components when I hover the horizontal menu and I want it to be in front of other components like this: here is the code that I have used to write this drop down menu: <div id="horizontalmenu"> <ul> <li><a href="#">اخبار</a> <ul> <li><a href="http://es.sums.ac.ir/newsGilrsElementary">ابتدایی دخترانه</a></li> <li><a href="http://es.sums.ac.ir/newsGilrsGuidance">راهنمایی دخترانه</a></li> <li><a href="http://es.sums.ac.ir/newsGilrsHigh">دبیرستان دخترانه</a></li> <li><a href="http://es.sums.ac.ir/newsBoysElementary">ابتدایی پسرانه</a></li> <li><a href="http://es.sums.ac.ir/newsBoysGuidance">راهنمایی پسرانه</a></li> <li><a href="http://es.sums.ac.ir/newsBoysHigh">دبیرستان پسرانه</a></li> </ul> </li> </ul> </div> <style type="text/css" media="screen"><!-- #horizontalmenu ul { padding:1; margin:1; list-style:none; } #horizontalmenu ul a{ padding:1; margin:1; list-style:none; color:white;} #horizontalmenu li { float:left; position:relative; padding-right:200; display:block;} #horizontalmenu li ul { display:none; position:absolute; width:200px; background:#9a2d91;} #horizontalmenu li:hover ul{ display:block; height:auto; width:200px;background:#9a2d91; } #horizontalmenu li ul li{ clear:both; border-style:none; width:200px;background:#9a2d91;} --></style> can any one help me with this please?
b6629cd60102cbb152c126e091dbd66f68d3a1abab67c7639071fdbb832feebc
['8feb09dec90343d8bd86dd862ca1ad25']
At the end i'm using an abstraction layer between web application and test logic. The test developer only use methods from abstraction classes. The advantage is that no test developer have to understand the structure of the web application. After 4 weeks of work with this layer it's possible to create and handle our tests really fast.
0cc9fca9ed372465434cd5e6c3bbbb77a999e9ddce25d21c2f4d12c46b3d7081
['8feb09dec90343d8bd86dd862ca1ad25']
First of all.. It would be better to use another language then javascript. I prefered python because you can easily add third party modules and use oop. If you are starting to write test automation scripts for a large software it would be better to create an architecture. In my last project I included abstraction layer classes which manage / control the gui of the aut (application under test). The benefit of these structure is a quick respond of modification (new buttons etc). Furthermore other test developers needn't to know how to interact with buttons, checkboxes etc because they have to use your methods from the abstraction layer. The best way to learn how a squish test script works, is to record a simple example (login). There you can see which functions to use. If the script works fine replace your text inputs with entries from a local tsv file and add a loop to create a bundle of test executions.
eed299711c6e50d5ab7efd7d445bcc5a7cadd7359a0274a52bbb2a551b2cf619
['8fefeb65bce94942bb93fd8b69e15181']
Try something like this html,body { width: 100%; height: 100vh; margin: 0 auto; padding: 0; background-color: dimgray; } nav{ background-color: aqua; position: fixed; top: 0; left: 0; width: 100%; display: flex; } .logo{ padding: 10px; } .nav-wrapper{ margin-left: auto; } ul { display: flex; } li{ list-style: none; } a{ display: block; padding: 10px; } <nav> <div class="logo"> <a href="#">LOGO</a> </div> <div class="nav-wrapper"> <ul> <li><a href="#">WORK</a></li> <li><a href="#">ABOUT</a></li> <li><a href="#">CONTACT</a></li> </ul> </div> </nav> <div> Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? <PERSON> sit amet consectetur adipisicing elit. Minus a veritatis blanditiis nemo id ipsam ipsum officia officiis. Ipsam dicta ad natus corrupti laborum ea tempore unde id est deserunt? </div>
dc5eb875dae4968f2c39bbc0fe23d80e70e6fbbc1569d15cceeb8cc68ce83cd3
['8fefeb65bce94942bb93fd8b69e15181']
I have a custom post type "project" with a taxonomy "taxoproject"and I have a template page "template-project.php" with a query loop to display my post. In this loop I need to display each category associated with the post. This is my code : <ul> <?php $terms = get_the_terms($post->ID, 'taxoproject'); foreach($terms as $term) { ?> <li> <?php echo $term->name; ?> </li> <?php } ?> </ul> My code works perfectly with one exception, I wish to display only the children of a specific parent of this taxonomy (id 76) and I do not know how to proceed. Thanks for your help
891d155bfec39bd4133f777c3bbba0e8d023ca68de638c70189e3ee179ec4798
['8ff52c81cd8d4647991d0f5323f34c21']
I'm using a pretty simple ffmpeg batch script, but it can't convert videos with single quotes in their titles. If the title is Boogiepop Phantom - 1x11 - Under The Gravity's Rainbow for example, I'll get the error [Parsed_subtitles_0 @ 000000670ea89ec0] Unable to open Boogiepop Phantom - 1x11 - Under The Gravitys Rainbow.mkv Note the removed single quote. I know ^ is the escape character, but the single quote is in a different spot every time. Do I need regex or is there a simpler way? for %%a in ("*.mkv") do ^ ffmpeg -i "%%a" ^ -vf subtitles="%%a" ^ "NEW\%%~na.mkv" pause
365971a27ce03f2ab3fb692e56cabb5a1ebfac10e68b0df4ad9c103f96255355
['8ff52c81cd8d4647991d0f5323f34c21']
My problem is identical to this person's, except I'm using ubuntu/trusty64. I get a 404 page when I go to localhost:4567. Vagrantfile: Vagrant.configure(2) do |config| config.vm.box = "ubuntu/trusty64" config.vm.provision :shell, path: "bootstrap.sh" config.vm.network :forwarded_port, guest: 80, host: 4567 end bootstrap.sh: apt-get update apt-get install -y apache2 if ! [ -L /var/www ]; then rm -rf /var/www ln -fs /vagrant /var/www fi These are straight from the setup guide. I also tried this from one of the answers there: $ cat bootstrap.sh #!/usr/bin/env bash apt-get update apt-get install -y apache2 if ! [ -L /var/www ]; then rm -rf /var/www ln -s /vagrant /var/www fi service apache2 start and ran vagrant reload, as well as vagrant reload --provision when that didn't work. This is what curl localhost:80 returns: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL / was not found on this server.</p> <hr> <address>Apache/2.4.7 (Ubuntu) Server at localhost Port 80</address> </body></html> Could it be that I don't have ssh working from command prompt? Git and cygwin are in my system and user path but I still get the ssh executable not found error. Putty works though. Using Windows 8.1, Vagrant 1.7.4, VirtualBox 5.0.6.
6986667697cfa71ab200e34d9ef767770e3dc35db89af65ced1e8d1c4dad42bf
['8ff7e4bf66cc421080c64526d2d06f92']
I've used 640, 480, 0 as an input, but it gives segmentation fault. WHat could be causing this to happen? /* Changes the size of an image, allocating memory as necessary, and setting all pixels to fillcolor. Returns 0 on success, or a non-zero error code.*/ int Image<IP_ADDRESS>resize( unsigned int width, unsigned int height, uint8_t fillcolor ){ if(pixels) { for(int i = 0; i < rows; i++) { delete[] pixels[i]; } delete[] pixels; } pixels = new uint8_t*[height]; if(pixels == NULL) { return 1; } for(int i = 0; i < height; i++) { pixels[i] = new uint8_t[width]; if(pixels[i] == NULL) { return 1; } } for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { pixels[i][j] = fillcolor; } } cols = width; rows = height; return 0; } I've used 640, 480, 0 as an input, but it gives segmentation fault. WHat could be causing this to happen?
a8dce2d404bc343e35e288fa99c35c7dde27594fff21d532ec6e99646be4dd17
['8ff7e4bf66cc421080c64526d2d06f92']
I tried to answer my question here: Submit two forms with one button (but couldn't get it solved) I have a HTML page displaying a form. I can click an "add more" button and append another form to the page. I want to be able to submit all those forms with a single button. The initial form has this header: <form class = "aform" method = 'POST' action="http://localhost:8080" > I use this button to submit all the forms: <input type = "button" value = "Submit" onclick="submitForms()"/> This is the submitForms() function: function submitForms() { var allforms = document.getElementsByClassName('aform'); for(var i = 0; i < allforms.length; i++) allforms[i].submit(); } The problem is: only the last form is sent to the json file. If there's only one form, it works fine; if there are two, only the second is sent. The code is huge, so I'm not sure if I've posted everything relevantt. EDIT: This is the node.js request else if (req.method === 'POST' && req.url === '/'){ var body =''; req.on('data', function(data){ body += data.toString(); }); req.on('end', function(){ var postObj = qs.parse(body); console.log(postObj); fs.appendFileSync('./data/users.json', JSON.stringify(postObj) + "\n ", function(err) { if (err) throw err; console.log('Saved!'); res.end(); });
e4ea83c7cc04b79ba838d490019e35dbf983e225dcff0cc19eb15a8cb84d675c
['8ff83075f47a4381a1c4ac2829e31641']
Como dices, al ejecutar la query, '$rutaImagen' no siempre es la ruta. hice un var_dump al $query para ver que es lo queestaba pasando a la bd. **Pues al sobreescribir $nArchivo, lo deja en blanco. y en la query solo se visualiza la direccion de la capeta sin el nombre del arcivo.**
c359fced593c22ab3b3ee594c1a31b75cdeb2dbca53f557c6d394ee1f416955a
['8ff83075f47a4381a1c4ac2829e31641']
<PERSON> , I did read the question "Why does car insurance also insure for injuries **rather than only insuring the car** itself?" , and the body says "Why not only have the drivers **insure their car** and then let everyone purchase separate insurance for injuries?" ; [[emphasis mine]] ; Also, OP says "in theory **car insurance** and disability/health insurance should be two **completely separate** products" ; I say there are indeed two separate components and **his meaning of car insurance is (B)** which is optional but (A) is mandatory because he is liable to cover the victims.
56e1d6b207d551716d8050c603d45c027fdd0f51a821dc466958ed129945a9e0
['901466b00ee049eeaa22ee634971a871']
The correct exception is VALUE_ERROR. However, OTHERS should catch that error too. The problem with your code is that the exception is being throwed in the declaration section of the block. If you move that assignment after the BEGIN you should be able to catch that exception. DECLARE v_order_no NUMBER(10); var NUMBER(10); BEGIN v_order_no := &Order_Number; SELECT 1 INTO var FROM tbl WHERE col = v_order_no; EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('ndf'); WHEN VALUE_ERROR THEN dbms_output.put_line('value_error'); WHEN OTHERS THEN dbms_output.put_line('Error'); END;
967487fd2c78fe9be5fd5517551505bb066e727816baf54d696d36733afcd7f8
['901466b00ee049eeaa22ee634971a871']
Another way to do it is to define the complete structure of the string and extract the second group: WITH data_tab AS ( SELECT '1540_INPUTTER' user_name FROM dual UNION SELECT '1540_RAZZ25_UNKNOWN' FROM dual UNION SELECT '1540_RAKIB17_OS_WIN10' FROM dual ) SELECT REGEXP_SUBSTR(user_name,'(\d{4}_)([A-Z0-9]+)(_)?(\w+)?',1,1,'i',2) AS st_user_name FROM data_tab;
079d30518fd22075b78ae3ae58f17336dade6f9bf23afe04397d188205c53c65
['901487e9f8374943b94d39ca5a5de6d0']
I'd like to figure out whether it's possible (and semantically legal) in Modelica to simulate a model of a first-order transfer function, with a time constant equal to zero (T below). I'm using OpenModelica 1.15.0~dev-48-g3656b95, but I'm asking the question in a general Modelica context. My context is experimenting Model Order Reduction on Modelica models, which brings me to try to use the Modelica.Blocks.Continuous.FirstOrder with a sometimes null time constant. However, to make the discussion simpler, here is the flat model I'm working on (a simplification and adaptation of the standard FirstOrder block): model FirstOrderZero import Modelica.SIunits; Real u "input"; Real y "output"; parameter Real k(unit="1")=1 "Gain"; constant SIunits.Time T=0 "Time Constant"; equation u = 1; der(y) = (k*u - y)/T; end FirstOrderZero; I understand that the way Modelica tools operate a symbolic equation analysis, the time constant T should be constant rather than a parameter. Indeed, for T=0, the differential equation gets degenerated into an algebraic equation y = k*u. Unless the Modelica simulation tool can generate different code pathways for different values of T (which I think no Modelica tool does, except maybe Modia in the future?), the fact that T is null or not should be decided at the beginning of the equation analysis. What I don't understand is why the above model fails to simulate ("division by zero at time 0 [...] where divisor expression is 0.0" with OM 1.15 dev) whereas it works when the last equation is rewritten as: T*der(y) = (k*u - y); I would assume that the symbolic equation analysis should reformulate the equation automatically? (I can see with OM Transformational Debugger that the equation becomes der(y) = (k - y)/0.0 which, of course, breaks at simulation). Or perhaps, is it syntactically illegal to write <PERSON> equations with a division by a null constant?
f01df086f6611c4fc681807b6b1d6b5a5e7db5694641fac285647f8f5522d54e
['901487e9f8374943b94d39ca5a5de6d0']
Many sources on this topic points to eithe using a plugin or changing some PHP code. However, a newer feature (WordPress 4.7) allows adding custom CSS to a theme (which is bound to that theme, but is not overwritten at theme updates). This saves the need to create a child theme. This tool is accessed through the "Additional CSS" tab in theme customization. Taking inspiration from this blog post about how to select the page title in CSS, I've added: .home .entry-title {display: none;} to hide the h1 title "Home" on my home page. I suspect that the home class is generic for all front pages (no matter the actual title of the home page). As an alternative, to remove the title on all pages (but not blog posts): .page .entry-title {display: none;} Finally, as explained in the blog post, it is possible to target a specific page with its id: .page-id-177 .entry-title {display: none;} where page-id-177 comes from the class attribute of the <body> tag of the page of interest. Thanks to the live preview, it's easy to see if the CSS is effective!
9b42b954fe561c694080f3cd881124d8115bd0d412775447289f1c6bb7eecd50
['902441dfb0634bb1acb71173ed6e335e']
This is a simplification to the purest case of a problem in a embedded system with arbitrary limits that i cannot control Let there be an array of anything, for example words: ["apple", "pear", "banana", "orange"] Let there be an array of indexes (starting at one) to remove items from: [1,3] We need a function that returns the result of removing those indexes from the starting array, in this example the result should be: ["pear", "orange"] as it removed indexes 1 and 3 However, the only accepted operation to achieve that is a function that removes one item by index from the array, and mutates it, for example: We have the original array ["apple", "pear", "banana", "orange"] We want to remove items [1,3] We removeItem(1) The result is ["pear", "banana", "orange"] The next item we want to remove is the item at index 3 of the original array, which is "banana", however, the item at current index 3 is "orange", thus, the naive approach to remove items does not work, as it will result in removing "orange" instead, with a final result of: ["pear", "banana"] instead of ["pear", "orange"]
41e19da65f16331bdc79de37fc69288748872b5a0e8b145023410181c390f134
['902441dfb0634bb1acb71173ed6e335e']
I have a payload that i want to validate using JSON schema, but there this case that i don't know how to translate to a schema. Let's say i have this object: { jobs: [ { title: "Developer", salary: "100", actual: false }, { title: "Plumber", salary: "200", actual: true }, { title: "Teacher", salary: "100", actual: false } ] } i want to write a schema that validates that IF there are objects in the jobs array, one (and only one) of them MUST have the actual key set to true. Is this possible?
a6a13657275d5d23f1c5a1b270f60cde7fd5e7bb97c90c5f1e18bd6482a16b35
['9025e48f89c74c94b5b5669d77ec100a']
Apply logic. It would make _no sense_ for it to mean "exactly 2" rather than "at least 2". Since lots of aspects of Stack Exchange expect people to use basic logic and / or common sense, there is no reason to change this just so people don't have to use common sense.
e2197c9176db229fbc61dbb6edb0a5ff940723bc74c4d447540927f44af7d25e
['9025e48f89c74c94b5b5669d77ec100a']
Errors relating to having a file in the current directory named the same thing as a standard library module. Errors relating to having a variable named `list` or `dict` etc. The problem finding duplicates is that none of the titles or questions have any common keywords from one to the next!
62b1a288ad958ccfd3f813d1d94789d77ab1cbb6ad898996f5a9393ea0caabe0
['902dd8bc01bf4b998295901ece015767']
I'm using this function to crop an image and when I use it, it doesn't release memory, I tried not using it and the memory works fine.I can't seem to find the problem with it.Please help - (void) processImage:(UIImage *)image { haveImage = YES; UIGraphicsBeginImageContext(image.size); [image drawInRect: CGRectMake(0, 0, image.size.width, image.size.height)]; __weak UIImage *smallImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); CGRect cropRect = CGRectMake(0, 0, image.size.width, image.size.height - ((image.size.height - image.size.width)/2)); CGImageRef imageRef = CGImageCreateWithImageInRect([smallImage CGImage], cropRect); __weak UIImage *corteSuperior =[UIImage imageWithCGImage:imageRef]; cropRect = CGRectMake(0, ((image.size.height - image.size.width)/2), corteSuperior.size.width, corteSuperior.size.height - ((image.size.height - image.size.width)/2)); imageRef = CGImageCreateWithImageInRect([corteSuperior CGImage], cropRect); self.imagenCamara.image = [UIImage imageWithCGImage:imageRef]; smallImage = nil; imageRef = nil; corteSuperior = nil; UIGraphicsEndImageContext(); CGImageRelease(imageRef); }
37be8c5d5a5f27d8641a0bbe68e5174e39eef815a499b6c6b301237150a14ee9
['902dd8bc01bf4b998295901ece015767']
You can try this, First make a view on the origin point x = 0 y = 480 (for iphone4) and then run this code. CGRect theFrame = self.viewMenuShare.frame; theFrame.origin = CGPointMake(0, 480); self.viewMenuShare.frame = theFrame; theFrame.origin = CGPointMake(0,480 - 187); [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.3f]; self.viewMenuShare.frame = theFrame; [UIView commitAnimations];
38cc93cdbf33bddb9e3542621c27785d4f328058a56d85b744d3fbc4552d11b5
['9034c793af204d95bda21480eea50cdf']
All licences are available until ArcInfo. The Conflation toolset is only for polyline feature but I am using polygons in this case. Currently I removed the ET Tool in the script. Its the last step that could be done manually. Now I can run the script with python 64 bit and have no memory problems. Nevertheless thanks for your answer! :)
5a5cb9a8407e2afcd3344ebd0a1727b10bd8f5b0ded40c59a1ece700cb48fb3f
['9034c793af204d95bda21480eea50cdf']
The simplest way I can think of to remove noise from this kind of recording would be to use the noise removal functions in Audacity (https://manual.audacityteam.org/man/noise_reduction.html). This allows you to select a section of noise with none of the target signal and get a noise profile. You then remove spectral content that fits with this profile, leaving most of the target signal intact. There are better software packages for this but it's probably worth experimenting with Audacity before paying money for those. If you're comfortable with Python it may also be worth checking out this: https://pypi.org/project/noisereduce/
c0ffbab26fb6d4c04dcca733216c91e804e2f03f52655f678578469b02373df9
['90370ec684da449994eb0b6dfd7467b6']
I like this explanation, but it's still missing a piece that I'm looking for. Perhaps my question should be, how does one go about *proving* that your new g(x) is actually identical in every way to f(x) except for at x=11? In this case is it just by inspection or is there something else that can be said?
b3f11883a8239f0d4f2129c1efb81679a4660937da081c8c7c255b828b3b75e3
['90370ec684da449994eb0b6dfd7467b6']
Yes and no - the actual process can be seen as a series of small waterfalls but the difference is that the process evolves and is improved upon from the input of the entire team (dev, qa, business etc), in retrospectives, which should lead to a much tighter unit which is able to react to issues and accurately plan and deliver. I'm grossly over simplifying it here, there is a lot more to it, but I don't think this is a bad starting point.
e19ddd93e4dc56353095977951a15a205dd8bb47540b30dbdd2cdfdd82ff5b82
['9040521d456c4163be0333d3a5fee3fa']
Thank you very much, <PERSON>. You code works on the R terminal, but doesn't on the linux terminal. I think its because the readline() function, so I've edited it using my userImput() function. I wasnt thinking about the repeatlooping. Thank you again repeat { inp <- userInput("Would you like to delete and re-run index generation? (yes or no) ") if (inp %in% c("yes", "no")) break() else write("Specify 'yes' or 'no'", stderr()) } if (inp == "yes") index_genom <- star.index.function()
4a81cf4087aef44eeec4a45bd745955dcfdbd132a26f2bbff3dfa2aaa303fa45
['9040521d456c4163be0333d3a5fee3fa']
I have several non-tab separated files. I would like to merge them and create a single file with some information about all files. I've tried this code but is not working when I use looping for The original file is like Warning: Output file '02-MappedReads_HISAT2/sam_folder/SAMPLE01_unsorted_sample.sam' was specified without -S. This will not work in future HISAT 2 versions. Please use -S instead. 9437 reads; of these: 9437 (100.00%) were paired; of these: 310 (3.28%) aligned concordantly 0 times 8977 (95.13%) aligned concordantly exactly 1 time 150 (1.59%) aligned concordantly >1 times ---- 310 pairs aligned concordantly 0 times; of these: 13 (4.19%) aligned discordantly 1 time ---- 297 pairs aligned 0 times concordantly or discordantly; of these: 594 mates make up the pairs; of these: 306 (51.52%) aligned 0 times 282 (47.47%) aligned exactly 1 time 6 (1.01%) aligned >1 times 98.38% overall alignment rate So I've used read.table fuction to read the file: (report_sample <- read.table(paste0(mapping_Folder, '/', 'SAMPLE01_summary.txt'), header = F, as.is = T, fill = TRUE, sep = ' ', skip = 1, blank.lines.skip = TRUE, text = TRUE)) (final <- data.frame('samples' = samples['1',1], 'Input_Read_Pairs' = report_sample[1,1], 'Mapped_reads' = report_sample[2,3], 'Mapped_reads_%' = report_sample[2,4], 'reads_unmapped' = report_sample[3,5], 'reads_unmapped_%' = report_sample[3,6], 'reads_uniquely_mapped' = report_sample[4,5], 'reads_uniquely_mapped_%' = report_sample[4,6])) So the output is like this samples Input_Read_Pairs Mapped_reads Mapped_reads_. reads_unmapped reads_unmapped_. reads_uniquely_mapped reads_uniquely_mapped_. 1 SAMPLE01 9437 9437 (100.00%) 310 (3.28%) 8977 (95.13%) its ok when I use only one file. If I do with for looping doesn't work as well So I've used read.table fuction to read the file: (report_sample <- read.table(paste0(mapping_Folder, '/', 'SAMPLE01_summary.txt'), header = F, as.is = T, fill = TRUE, sep = ' ', skip = 1, blank.lines.skip = TRUE, text = TRUE)) (final <- data.frame('samples' = samples['1',1], 'Input_Read_Pairs' = report_sample[1,1], 'Mapped_reads' = report_sample[2,3], 'Mapped_reads_%' = report_sample[2,4], 'reads_unmapped' = report_sample[3,5], 'reads_unmapped_%' = report_sample[3,6], 'reads_uniquely_mapped' = report_sample[4,5], 'reads_uniquely_mapped_%' = report_sample[4,6])) So the output is like this samples Input_Read_Pairs Mapped_reads Mapped_reads_. reads_unmapped reads_unmapped_. reads_uniquely_mapped reads_uniquely_mapped_. 1 SAMPLE01 9437 9437 (100.00%) 310 (3.28%) 8977 (95.13%) its ok when I use only one file. If I do with for looping doesn't work as well report_sample <- array(dim = 0) for (i in samples[,1]) { report_sample[i] <- read.table(paste0(mapping_Folder, '/', i,'_summary.txt'), header = F, as.is = T, fill = TRUE, sep = ' ', skip = 1, blank.lines.skip = TRUE, text = TRUE, ) } final <- data.frame('samples' = samples['1',1], 'Input_Read_Pairs' = report_sample[1,1], 'Mapped_reads' = report_sample[2,3], 'Mapped_reads_%' = report_sample[2,4], 'reads_unmapped' = report_sample[3,5], 'reads_unmapped_%' = report_sample[3,6], 'reads_uniquely_mapped' = report_sample[4,5], 'reads_uniquely_mapped_%' = report_sample[4,6]) $SAMPLE01 [1] "9437" "" "" "" "" "" "" "these:" [9] "" "time" "" "" "discordantly;" "" "pairs;" "" [17] "0" "" "exactly" "" ">1" "98.38%" $SAMPLE02 [1] "9437" "" "" "" "" "" "" "these:" [9] "" "time" "" "" "discordantly;" "" "pairs;" "" [17] "0" "" "exactly" "" ">1" "98.38%" $SAMPLE03 [1] "9437" "" "" "" "" "" "" "these:" [9] "" "time" "" "" "discordantly;" "" "pairs;" "" [17] "0" "" "exactly" "" ">1" "98.43%"
dd2c6f332cf908a7037f62c3b0b91e47851cff96a99890cd44fc4489b4af8837
['90454f4ee092422ea10e209eda9bb5da']
For a school projecht we want to read data from the data pins and send them to a php aplication. We get the data and can make a json string from it, but when we try to send the data (multidimensional) the $_POST var is empty of the php script (it returns the $_POST var). Do we something wrong? we can not find a working example. Thanks. Sending part: Serial.println("versturen..."); String postData = "{\"naam\":\"ik\"}"; /*apiconnectie.beginRequest(); apiconnectie.post(path); //apiconnectie.sendHeader("Content-Type", "application/x-www-form-urlencoded"); apiconnectie.sendHeader("Content-Type", "application/json"); apiconnectie.sendHeader("Content-Length", postData.length()); apiconnectie.beginBody(); apiconnectie.print(postData); apiconnectie.endRequest(); */ apiconnectie.beginRequest(); apiconnectie.post(path); apiconnectie.print("Content-Length: "); apiconnectie.println(postData.length()); apiconnectie.println(); apiconnectie.println(postData); statusCode = apiconnectie.responseStatusCode(); response = apiconnectie.responseBody(); Serial.println("Status code: "); Serial.println(statusCode); Serial.println("Response: "); Serial.println(response);
17c4981546631295394449bf9bb8af8aeab2722d84198f0e7e2334f317d5ea78
['90454f4ee092422ea10e209eda9bb5da']
I load json from a php file but the json contains other data. The events are placed in the 'fullcalendar' object but i do not know how i can select the data. I load current the data with this code, can someone point me in the right direction? Greathings <PERSON> $('#Agenda').fullCalendar({ lang: 'nl', height: "parent", header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, events: { url: json_url, type: 'POST', data: { actie: "GetList" }, success: function(data) { return data.fullCalendar; }, error: function(data) { alert('Systeemfout.'); } }, eventClick: function(calEvent, jsEvent, view) { var huur_id = calEvent.id; weergave(huur_id); }, dayClick: function(date, jsEvent, view) { var label = date.format("d-MM-YYYY"); } })
6b48e28958d3cf26ba79bd0622738577bab4035a8f881798d9b8730200689816
['904769ca261c43f99f2d1e890f811f6e']
Here is <PERSON> highchart stacked bar stacked label issue Highcharts.chart('container', { chart: { type: 'bar' }, title: { text: 'Stacked bar chart' }, xAxis: { categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas'] }, yAxis: { min: 0, title: { text: 'Total fruit consumption' }, stackLabels: { enabled: true, align: 'right', style: { color: '#838383', fontSize:"12px", fontWeight:"normal", width:'60px' } } }, legend: { reversed: true }, plotOptions: { series: { stacking: 'normal' } }, series: [{ name: '<PERSON>', data: [5555555555555, 3, 4, 7, 2] }, { name: '<PERSON>', data: [2, 2, 3, 2, 1] }, { name: '<PERSON>', data: [3, 4, 4, 2, 5] }] }); Is there anyway to set max length of bar so that yAxis label doesn't hide? or how can i show full label?currently its hidding some part of label if its value is large.
1fd55aff16b59c31bde1c24c274040529a01cee36382a259483337f335b3473f
['904769ca261c43f99f2d1e890f811f6e']
Here is the js fiddle Working Map Highcharts.mapChart('container', { chart: { map: 'countries/us/us-all', borderWidth: 1 }, title: { text: 'US population density (/km²)' }, exporting: { sourceWidth: 600, sourceHeight: 500 }, legend: { layout: 'horizontal', borderWidth: 0, backgroundColor: 'rgba(255,255,255,0.85)', floating: true, verticalAlign: 'top', y: 25 }, mapNavigation: { enabled: true }, colorAxis: { min: 1, type: 'logarithmic', minColor: '#EEEEFF', maxColor: '#000022', stops: [ [0, '#EFEFFF'], [0.67, '#4444FF'], [1, '#000022'] ] }, series: [{ animation: { duration: 1000 }, data: data, joinBy: ['postal-code', 'code'], dataLabels: { enabled: true, color: '#FFFFFF', format: '{point.code}' }, name: 'Population density', tooltip: { pointFormat: '{point.code}: {point.value}/km²' } }] }); Now here is the same map but its not working map-not-working var data = [ { "value": 0, "code": "nj" }, { "value": 387.35, "code": "ri" }, { "value": 312.68, "code": "ma" }, { "value": 271.4, "code": "ct" }, { "value": 209.23, "code": "md" }, { "value": 195.18, "code": "ny" }, { "value": 154.87, "code": "de" }, { "value": 114.43, "code": "fl" }, { "value": 107.05, "code": "oh" }, { "value": 105.8, "code": "pa" }, { "value": 86.27, "code": "il" }, { "value": 83.85, "code": "ca" }, { "value": 72.83, "code": "hi" }, { "value": 69.03, "code": "va" }, { "value": 67.55, "code": "mi" }, { "value": 65.46, "code": "in" }, { "value": 63.8, "code": "nc" }, { "value": 54.59, "code": "ga" }, { "value": 53.29, "code": "tn" }, { "value": 53.2, "code": "nh" }, { "value": 51.45, "code": "sc" }, { "value": 39.61, "code": "la" }, { "value": 39.28, "code": "ky" }, { "value": 38.13, "code": "wi" }, { "value": 34.2, "code": "wa" }, { "value": 33.84, "code": "al" }, { "value": 31.36, "code": "mo" }, { "value": 30.75, "code": "tx" }, { "value": 29, "code": "wv" }, { "value": 25.41, "code": "vt" }, { "value": 23.86, "code": "mn" }, { "value": 23.42, "code": "ms" }, { "value": 20.22, "code": "ia" }, { "value": 19.82, "code": "ar" }, { "value": 19.4, "code": "ok" }, { "value": 17.43, "code": "az" }, { "value": 16.01, "code": "co" }, { "value": 15.95, "code": "me" }, { "value": 13.76, "code": "or" }, { "value": 12.69, "code": "ks" }, { "value": 10.5, "code": "ut" }, { "value": 8.6, "code": "ne" }, { "value": 7.03, "code": "nv" }, { "value": 6.04, "code": "id" }, { "value": 5.79, "code": "nm" }, { "value": 3.84, "code": "sd" }, { "value": 3.59, "code": "nd" }, { "value": 2.39, "code": "mt" }, { "value": 1.96, "code": "wy" }, { "value": 0.42, "code": "ak" }] Highcharts.mapChart('container', { chart: { map: 'countries/us/us-all', borderWidth: 1 }, title: { text: 'US population density (/km²)' }, exporting: { sourceWidth: 600, sourceHeight: 500 }, legend: { layout: 'horizontal', borderWidth: 0, backgroundColor: 'rgba(255,255,255,0.85)', floating: true, verticalAlign: 'top', y: 25 }, mapNavigation: { enabled: true }, colorAxis: { min: 0, type: 'logarithmic', minColor: '#EEEEFF', maxColor: '#000022', stops: [ [0, '#EFEFFF'], [0.67, '#4444FF'], [1, '#000022'] ] }, series: [{ animation: { duration: 1000 }, data: data, joinBy: ['postal-code', 'code'], dataLabels: { enabled: true, color: '#FFFFFF', format: '{point.code}' }, name: 'Population density', tooltip: { pointFormat: '{point.code}: {point.value}/km²' } }] }); Because data have a zero value. I want to show zero value also on map.I also change colorAxis.min value to zero but highchart throwing this error Here is link of view demo that is shown in highchart error pic demo link . Link is also throwing 404 error.
e161a07705ab06a93b9be921772f4c48f957ffd2c800a35b0155d0096309993a
['9048da211df140dcad56161ba8859959']
I have got the the next task recently: increment the version of the sharepoint feature each time when we are building the project. I have completed it successfully using the attribute "Version" in feature.xml file. I change it executing the custom code within MSBuild. So, the feature version in xml file changes, but how can I get it programmatically when the feature is working? I use SharePoint Server 2007, Visual studio 2008. I'll appreciate any help. Thank you. P.S. SPFarm.Local.BuildVersion contains another version, which is different from the version in feature.xml file.
c96e210cbdfd4068b26c9c5053d74eb07e44740852e1714123452a8d6884b40e
['9048da211df140dcad56161ba8859959']
I have two different servers: Jenkins EC2 instance (my vuejs application) So When I am trying to deploy vuejs application using Jenkins SSH Plugin to remote server but it can't connect The log : [SSH] executing... ERROR: Failed to authenticate with public key com.jcraft.jsch.JSchException: invalid privatekey: [B@482626ec Private Key (dev.pem file content) I can't figure out what is wrong. So when i try connect by command line: ssh -i dev.pem ec2-user@ec2-ip -p 22 It connected. Please help me, What should I do ?
ccdf97ad3be7a8783a9926767bc3f41def68da0b37b92878e7e292aa28b9c97a
['904962aa3f0e434ca3752a47fc85368e']
You could add a data attribute to the button elements when they are clicked, and then check which buttons have those attributes. $(button).click(function(){ $(this).attr("data-clicked", true) }) You might want to add a specific class to the buttons when creating them to target them with a selector above, or you could generate the buttons with createElement and add the event with addEventListener. Then you can target all clicked buttons in jquery by just finding the buttons with that attribute: $("button[data-clicked]") Or to check if a button is clicked you can use buttonElement.hasAttribute("data-clicked")
f372bc50bb2093afcc2d081a270c18f57a20feab6b7b7693a2cbf33347fddb48
['904962aa3f0e434ca3752a47fc85368e']
var tab1image[i] isn't valid. tab1image[i] is referring to tab1image which is a value that exists, so you don't need the var on that line. You're setting a property of the existing tab1image variable, not declaring a new one. However, if you'd like to convert an array of sources to an array of images, you can use the map function of an array to do that: var imageSources = ["Image1.png" , "Image2.png"]; var images = imageSources.map(source => { var image = new Image(); image.src = source; return image; }); // images is now an array of images, just like the tab1image array in your original code That way you don't need to create a seperate array to hold the images ahead of time!
0d5c4d9d82e077f82364e8ebac24994c17a98f6caecb6bc8a26e5d3713d431cf
['9060996a34fe475fa91145165cceea4f']
i using ffmpeg to create a streamable mp4 video file for play online. but converted video try to load 3 - 4 MB data of video at start. then video can be play and seekable. i try to remove start load data by different ffmpeg commands. but each commands had problems. my first command(load 3-4 MB data of video at start and seekable): ffmpeg -i file.mkv -movflags faststart -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 1.mp4 and other commands(removed 3-4 MB load data at start and NOT seekable): ffmpeg -i CloudywithaChanceofMeatballs.mkv -movflags faststart -frag_size 1024 -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 1.mp4 ffmpeg -i DespicableMe2MiniMovie.mkv -movflags faststart -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 2.mp4 ffmpeg -i DespicableMe2MiniMovie.mkv -movflags faststart -frag_size 10240 -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 2.mp4 ffmpeg -i DespicableMe2MiniMovie.mkv -movflags faststart -frag_duration 2000 -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 2.mp4 ffmpeg -i CloudywithaChanceofMeatballs.mkv -movflags faststart -frag_duration 2000 -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 2.mp4 ffmpeg -i CloudywithaChanceofMeatballs.mkv -movflags frag_keyframe+empty_moov -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 2.mp4 ffmpeg -i CloudywithaChanceofMeatballs.mkv -g 52 -movflags frag_keyframe+empty_moov -s 500x268 -vf "movie=watermark.png [watermark]; [in][watermark] overlay=10:main_h-overlay_h-10 [out]" -b:v 100k -b:a 45k 2.mp4 i used this command too(it load 3-4 MB data of video at start and seekable like first code by ffmpeg): MP4Box -add video.mp4 videos.mp4 MP4Box -inter 500 video.mp4 my video file duration is: 1h 34min and converted size is ~100MB
d0643d46e1f29c2ad889fe7de2180428643998d619aee77175afeebce1d32653
['9060996a34fe475fa91145165cceea4f']
i using windows and cmd to move some files in a rar directory into root of rar by command line? i am using windows and cmd to rename files i can rename files by rn and rar project: rar rn out.rar file1.jpg file3.jpg it work but this is dont work: rar rn out.rar files/finf1.jpg files/finf3.jpg where is my porblem
de9d302d8ba76d67b80c331a611177dcacbbf85c5787d197efe5dbce06662610
['90711c7383094aab83b7e7d34de1814f']
In GridView.builder, we must give a fixed value for the itemCount property. So what is the best way to update this property when we adding a new image to the grid view by uploading it to firebase storage? Here I just used the image name to get the image from the firebase storage. But I need to change this to get the image url and show the image. Here's my code, class ImagesScreen extends StatelessWidget { // building grid view Widget makeImagesGrid(){ return GridView.builder( itemCount: 12, //number of grid items gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, ), itemBuilder: (context, index){ return ImageGridItem(index + 1); //populating with grid items }, ); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Image Grid'), ), drawer: NavDrawer(), body: Container( child: makeImagesGrid(), ), ); } } class ImageGridItem extends StatefulWidget { int _index; //each grid item index ImageGridItem(int index) { this._index = index; } @override _ImageGridItemState createState() => _ImageGridItemState(); } class _ImageGridItemState extends State<ImageGridItem> { Uint8List imageFile; //to store image file //firebase storage reference StorageReference photosReference = FirebaseStorage.instance.ref().child("photos"); //getting image from the firestore getImage() { if (!requestedIndex.contains(widget._index)) { //when requested index does not cotain in the list int MAX_SIZE = 7 * 1024 * 1024; //maximum file size for an image //accessing firebase storage to get the photo photosReference .child('${widget._index}.jpg') .getData(MAX_SIZE) .then((value) { //value is image reference this.setState(() { imageFile = value; //updating imageFile }); //insert image file to the imageData map imageData.putIfAbsent(widget._index, () { return value; }); }).catchError((error) {}); //insert image file index to the requestedIndex list in the data_holder.dart requestedIndex.add(widget._index); } } //to decide whether to show the default text or actual image Widget decideGrideTileWidget() { if (imageFile == null) { //showing default text until it show the image return Center(child: Text('No Data')); } else { return Hero( tag: imageFile.toString(), child: Image.memory( //showing the actual image imageFile, fit: BoxFit.cover), ); } } @override void initState() { super.initState(); if (!imageData.containsKey(widget._index)) { //when imageData map does't cotains the key getImage(); } else { //if its already contains get the image from the imageData map imageFile = imageData[widget._index]; } } @override Widget build(BuildContext context) { return InkWell( child: Padding( padding: const EdgeInsets.all(3.0), child: GridTile( child: decideGrideTileWidget(), ), ), onTap: () {} ); } }
a928a1965690c7cf000d332491d3341d7e771f2a016920fdf9224e14ba2a7389
['90711c7383094aab83b7e7d34de1814f']
I'm trying to save an image to phone local directory. Here I use image_downloader package for that. Here's my code class DownloadImage { Future writeToDownloadPath(GridImage imageData) async { try { var imageId = await ImageDownloader.downloadImage(imageData.url ,destination: AndroidDestinationType.custom(directory: 'motivational Quotes', inPublicDir: true ,subDirectory: '/motivational Quotes${imageData.location}')); print('imageId' + imageId.toString()); if (imageId == null) { return; } } catch(e) { print(e.toString()); } } } When I run on Android 10 device and try to download an image it gives me this error, E/MethodChannel#plugins.ko2ic.com/image_downloader(25282): java.lang.IllegalStateException: Not one of standard directories: motivational Quotes I already added android:requestLegacyExternalStorage="true" in AndroidManifest and set targetSdkVersion and compileSdkVersion to 29 in build.gradle file. I did flutter clean and run the code but issue remain the same. build.gradle defaultConfig { applicationId "com.example.app minSdkVersion 21 targetSdkVersion 29 versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true } AndroidManifest <application android:name="io.flutter.app.FlutterApplication" android:label="Motivational Quotes" android:icon="@mipmap/ic_launcher" android:requestLegacyExternalStorage="true"> I would be really grateful if anyone can help me with this issue. Thanks !
799989eff073334a218c860c0c352d31172a07bc8279cee2799bcfb182728bf6
['90726540061f4ac4bd57c75c917735a8']
Hi I have this code for XSS filtering: public class CrossSiteScriptingXSSRequestWrapper extends HttpServletRequestWrapper { public CrossSiteScriptingXSSRequestWrapper(HttpServletRequest servletRequest) throws IOException { super(servletRequest); } @Override public String[] getParameterValues(String parameter) { String[] values = super.getParameterValues(parameter); if (values == null) { return null; } Stream<String> stream = Arrays.stream(values); if (values.length > 35) { stream = stream.parallel(); } stream.forEach(value -> { XSSRemover.skipXSS(value); }); return values; } @Override public String getParameter(String parameter) { return XSSRemover.skipXSS(super.getParameter(parameter)); } @Override public String getHeader(String name) { return XSSRemover.skipXSS(super.getHeader(name)); }} I want to ask if it's needed or it's possible to replace it with: <security:headers> <security:frame-options policy="SAMEORIGIN"/> <security:xss-protection enabled="true"/> <security:cache-control/> </security:headers> And then browser will handle it instead of filter? Thanks for answers :)
4e0e056fb618d5e0d434121a773665e39e60b110db2e40201bb84b9248ec47d5
['90726540061f4ac4bd57c75c917735a8']
I have this SQL query written in JDBC which contains dynamic table and fields names: private String checkDimension(String tenantId, String prefix, Long schemaMetaId, Long transactionalMetaId, String dimension, String dimensionValue) { DataSource tenantDataSource = tenantDataSourceProvider.getTenantDataSource(checkEntityName(tenantId)); try (Connection connection = tenantDataSource.getConnection()) { String sql = String.format("select * from \"%s_%s\" input_file join \"DIMENSION_VALUES_%s\" dv on " + "(dv.\"DIMENSION\" = ? and dv.\"DIMENSION_VALUE\" = input_file.\"%s\") limit 1", checkEntityName(prefix), checkEntityName(schemaMetaId.toString()), checkEntityName(transactionalMetaId.toString()), checkEntityName(dimensionValue)); try (PreparedStatement statement = connection.prepareStatement(sql)) { statement.setString(1, dimension); try (ResultSet resultSet = statement.executeQuery()) { if (resultSet.next()) { return "OK"; } else { return "Values do not match"; } } } } catch (SQLException exception) { throw new IllegalStateException(exception); } } For mitigation flaws I am using function checkEntityName which should silent them (make them false positive during Veracode scan) @SQLQueryCleanser static String checkEntityName(String entityName) { if (!entityName.matches("^[-a-zA-Z0-9_]*$")) { throw new SecurityException(String.format("Invalid name for entity: %s", entityName)); } return entityName; } But Veracode is still reporting this issue: Flaw Id: 1433 Description: This database query contains a SQL injection flaw. The call to java.sql.Statement.executeQuery() constructs a dynamic SQL query using a variable derived from untrusted input. An attacker could exploit this flaw to execute arbitrary SQL queries against the database. The first argument to executeQuery() contains tainted data from the variable format(). The tainted data originated from an earlier call to java.sql.Statement.executeQuery. Remediation: Avoid dynamically constructing SQL queries. Instead, use parameterized prepared statements to prevent the database from interpreting the contents of bind variables as part of the query. Always validate untrusted input to ensure that it conforms to the expected format, using centralized data validation routines when possible. Can you please give me advice how to solve this? Thank you :)
611ad2dc2c6ca2c61b6bc42051a4503acad22d1fcef70b3e48a169d82899202f
['9073ffd729a14c55bd5a99f41cc6a3dc']
you can access #document methods on server side as well just you need to properly link files . on whatever server side language you are working there is a method to add dynamic data lets say you are working on node.js with handlebars templating engine then you can do something like this <div {{if conditn_true}} class="anyname" {{/if}}></div> if you are using php then <div class="<?php something related to class ?>" ?> ></div> other dom methods var element = document.getElementById("myDIV"); element.classList.add("mystyle"); hope this helps...be more specific on what exactly you are trying to achieve by mentioning some code snippet so that we can further help you
913e4bfaeea0b81c3ff7d22315f28fe94a5addf6febe5df3692cb9d13223cab0
['9073ffd729a14c55bd5a99f41cc6a3dc']
if intellisense in not working for react js or javascript or node js this solution will help for windows uninistall type script by typing npm uninstall -g typescript install specific version of type script that is 3.3 by typing npm install -g typescript@3.3 add the typescript location in vscode by navigating to file > Preferences > settings > here search for edit in setting.json then add this path "typescript.tsdk": "/Users/yourusename/AppData/Roaming/npm/node_modules/typescript/lib" settings.json should look someting like this { "editor.suggestSelection": "first", "vsintellicode.modify.editor.suggestSelection":"automaticallyOverrodeDefaultValue", "typescript.tsdk": "/Users/yourusername/AppData/Roaming/npm/node_modules/typescript/lib" }
5b342c4fb3f3476668cdcdd1b25582da96b6f7ae7f928aa36300d44f9759e818
['9079e7bdf9344e43991c94037c3cb178']
There is something I am not understanding and I guess it must be pretty basic. Can someone please be so kind to explain to me the relationship between Classes and Objects enough so that I can understand what is happening below? Both Location and Name are properties of the PivotTable Class and return strings. Why do the first statements work but the last 4 give the error "Object doesn't support this action (Error 445)"? ?ActiveWorkbook.ActiveSheet.PivotTables.Count 3 ?ActiveWorkbook.ActiveSheet.PivotTables(1).Name PivotTable12 ?ActiveWorkbook.ActiveSheet.PivotTables(2).Name PivotTable3 ?ActiveWorkbook.ActiveSheet.PivotTables(3).Name PivotTable2 ?ActiveSheet.PivotTables(1).Location ?ActiveSheet.PivotTables(2).Location ?ActiveSheet.PivotTables(3).Location ?ActiveSheet.PivotTables("PivotTable12").Location [Location Def][1] [Immediate Window][2] [Error][3]
1b6781dffba84f473793e8f834cebaf04065afdddc6688743917952f2b65c5c1
['9079e7bdf9344e43991c94037c3cb178']
This Range("Table1[#All]").Copy Destination:=Workbooks(5).ActiveSheet.Range("A1") works as I understand to expect but this will not and gives Run-time-error '1004': Application-defined or object-defined error Range("Table1[#All]").Copy Destination:=Workbooks.Add.ActiveSheet.Range("A1") Tried understanding help here but just not getting there What are the rules governing usage of brackets in VBA function calls?
a9bf9a6db4a9b3f13a63843f519af653443cc81b67bee869cfbaafe1df7ed654
['908b8f0713af43eab998e3afd625aa68']
I am just starting to get into server hardware, so please bear with me. I bought a HP ProLiant DL380 Generation 7 with a LFF drive cage and I do not know which SAS drives are actually compatible. Does every SAS drive work? In particular i found this cheap IBM drive on eBay (IBM 45W7765 45W7766 with 3TB and 7200rpm) and would like to know if it will work with the DL380, or are there any limitations? I checked the quick specs guide but it only mentions some HP drives. Thanks in advance!
ae57cbf0b740f87dd5b32bd3463c95f624e2f5dc8de99db79f2bac630703a6ad
['908b8f0713af43eab998e3afd625aa68']
I can't comment yet, so i just write it as answer. The cabinet itself typically doesn't have cooling. The cooling (the actual fans) are located inside the individual chassis and blow air from the front to the back of the server. Cooling on the cabinet doesn't make much sense. A small air conditioned room would be perfect for the rack servers to keep the noise in you office low. Rack servers can get pretty loud because of their small form factor.
6b30e76cc9264b262f69a8f7ee03ca81078ad8007b3c90eae2f6ff062afd0f32
['908fad8d2719433fb874ca8e9e3376ec']
I have created a css dropdown menu. The menu items have the same width as the menu button. But on applying border to the menu button and menu items (menu items are positioned absolutely)(used border-box for both menu button and menu items), the borders are not aligning correctly Please see JS Bin HTML Code html, body { width: 100%; height: 100%; font-family: 'Roboto', sans-serif; } div.time { position: absolute; padding: 10px; display: inline-block; color: white; background-color: limegreen; box-sizing: border-box; left: 50%; } div.time:hover { cursor: pointer; border: 1px solid limegreen; } div.time > div { display: none; box-sizing: border-box; } div.time:hover { background-color: white; color: lightgrey; } div.time:hover > div { position: absolute; cursor: pointer; display: block; width: 100%; top:100%; left:0; background-color: white; border: 1px solid limegreen; } div.time > div > div { display: block; padding: 5px 10px 5px 10px; color: darkgrey; } div.time > div > div:hover { background-color: limegreen; color: white; } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> </head> <body> <div class="time"> Time <div> <div>AM</div> <div>PM</div> </div> </div> </body> </html> </body> </html> Why is this happening even thought the menu button and menu items have the same width. Also both of them have the same box-sizing: border-box property?
2c619470df46ed5f5886ccf95d25cc5ef7efda59e6fb4e228d1ff5b64ca306bb
['908fad8d2719433fb874ca8e9e3376ec']
The spring boot web application (sts-bundle) is showing the error: Archive for required library: 'C:/Users//.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.5.6.RELEASE/spring-boot-autoconfigure-1.5.6.RELEASE.jar' in project 'demo' cannot be read or is not a valid ZIP file Can anyone help me with this error. Thanks in advance.
1502e16a6a2919bf40d9377ce3ac76137c89ace8c1ac43228d3cc4a074218cfd
['90945909e94b43f59b35008866112013']
This was the best I could do for you. It's just a lot of formatting and method invoking. var <PERSON> = new Date(); var am_or_pm = today.toLocaleString([], { hour:'numeric', hour12: true }); var TK_send_date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate(); var TK_send_hour = today.getHours(); var TK_send_minute = today.getMinutes(); var TK_ampm = am_or_pm.slice(-2);
599c6aad3d6ac1b09b23c542ef1306520b25b0826af2cfa0010f73fd76c68c0e
['90945909e94b43f59b35008866112013']
I would solve this problem with some string interpolation. Consider the following: <input type="number" name="minutes" min="0" max="59"> <input type="number" name="seconds" min="0" max="59> And then for the C# var minuteTime = Request.Form["minutes"] var secondTime = Request.Form["seconds"] FormattableString finalDate = "$00:{minuteTime}:{secondTime}" //Write to the database with model
d4f20cf3f49cb297873e5735481177b80422efbfb4adbf3d19b49b0786bc1d73
['9096e6a17467414dafb83e940eef3697']
I read <PERSON>'s derivation of the Black-Scholes equation in "An Introduction to Financial Option Valuation". The issue I am having is that it relies on some assumptions related to a continuous time asset model, but these assumptions do not seem completely justified. I am hoping that someone has seen this derivation (but this may not be necessary to answer my question). The idea is to start with a discrete time asset model that models the price $S(t)$ of an asset. The model is \begin{equation} S(t_{i+1}) = (1+\mu \delta t + \sigma \sqrt{\delta t} Y_i)S(t_i) \end{equation} where we are working on a time interval $[0,t]$ with $n$ subintervals $[t_i, t_{i+1}]$ of length $\delta t$. Here, $\mu$ and $\sigma$ are constants and $Y_i$ are I.I.D. random variables with distribution N(0,1). Now, when moving to the continuous time model (which corresponds to the limit $\delta t \to 0$), <PERSON> writes \begin{equation} \text{log}\left(\frac{S(t)}{S(0)} \right) = \sum_{i=1}^n \text{log} \left(1 + \mu \delta t + \sigma \sqrt{\delta t} Y_i \right) \end{equation} and then expands the right hand side as a <PERSON> series to compute the expected value and variance of the left hand side. Appealing to the central limit theorem then allows one to write down a continuous time model for $S(t)$. The issue I have is with the $\text{log}$ on the right hand side. It seems that the argument can be negative and so this shouldn't be defined. How can one get around this issue? <PERSON> also claims that the Taylor series expansion is valid even though the argument is a random variable. Is there also a way to make this statement rigorous?
d1f88428b7b9e16b4963d8fd731f85ccd849e3254f3c50dadfbbe2536f4aff6f
['9096e6a17467414dafb83e940eef3697']
Sure there are such models that contain no transitive models. But saying that there exists a model of ZFC with a transitive element that is a model is different to saying that every model of ZFC contains a model like that. Showing that every finite subset of a theory is consistent is by the compactness theorem enough to show that the theory is consistent. In this case, the theory would be "ZFC+(there exists a transitive model of ZFC)".
c03ba61ad2970cd3c4c7f46a9a4f427695b798c16f91d36e7922d4aae67f3636
['909a5fb1838d41a88cf3a3714f292450']
This is the code that I used in the reducer to add items to cart, the return statement below is what I was trying to use to not allow any duplicate items in the cart but to change only the quantity of the item. But it still did not work. The quantity does update but I still end up with duplicate values. So please help me figure this out, Thx export const initialState = { cart: [] } const Reducer = (state = initialState, action) =>{ switch(action.type){ case "ADD_TO_CART": const {id, quantity} = action.item let alreadyInCart = false, newQty=0 state.cart.forEach(x =>{ if(x.id === id){ alreadyInCart = true newQty = parseInt(x.quantity+quantity) } }) //let categories = [...new Set(Inventory.map(x=>x.category))] if(!alreadyInCart){ return { ...state, cart: [...state.cart, action.item] } } else{ ***return { ...state, cart: [...state.cart, {...action.item, quantity: newQty} ] }*** } default: return state } } export default Reducer
8c3c723341bfaf0f54368d4ac45a179c518d1bfd7e40a54f10b535a28798200d
['909a5fb1838d41a88cf3a3714f292450']
I am trying to get data from the firestore and then filter it then map it like so: return Inventory .filter(x =>x["sub_category"] === item && x["category"] === category) .map(({id, item, price, quantity, image})=>{ //sets the default value for the item with that specific id const defVal = parseInt((selectedQty.id === id)?selectedQty.qty:0) return ( <React.Fragment key={uuid()}> <div className="card"> <img src={image()} alt={item} /> <p>{item}</p> <div className="innerBox"> <div className="dropdown"> <label htmlFor="quantity">Qty:</label> <select id="quantity" defaultValue={defVal===0?1:defVal} onChange={e => { e.preventDefault() setSelectedQty({id, qty: parseInt(e.target.value)}) }}> { Array(quantity).fill().map((_, i)=> { if(i===0){ return <option key={uuid()} value={0}>-</option> }else{ return <option key={uuid()} value={i} >{i}</option> } }) } </select> </div> <b>$ {price}</b> </div> <button type="submit" onClick={()=> { addToCart(id, item, parseInt(finalQty), price, image(), parseInt(finalQty)*parseFloat(price)) setSelectedQty({id:null, qty: 0}) }}>Add to Cart</button> </div> </React.Fragment> )}) Currently I am using Inventory Array but I want to switch to firestore but I have no clue how to do it. I am aware of the step db.collection().get().then(etc...) but i don't know how to map it to return it inside the Then
693482ca0ebfde8d1366b990054c78333425d451557318d7d6bf3fcabc7ef56e
['90a2f88b95b545a2a3aa0a20f4e247ab']
While I'm not necessarily opposed to some kind of change in the way reputation is displayed in order to level the playing field, so to speak, for new users, requiring an upvote / downvote is not the right way to do it. If I know a solution is correct and complete, I will upvote it / downvote it based primarily on its correctness and completeness, not on the reputation on the user that posted it. Hiding the username (or just the reputation) in this case would not affect me too much. On the other hand, if I am not sure about the correctness of the answer, I will tend to trust a user with high rep more, because a high reputation is an indication that a user can be trusted. Hiding the username / reputation in this case would definitely be bad. I would have less information on which to base my actions. Users would have to test the solution for correctness (which wouldn't necessarily help them understand if the answer is truly complete) or even worse, vote on the answer without having tested it, just to know who answered it. So in the first case, this change would have little beneficial impact on voting patterns (mine at least), and in the second case, this change would be significantly detrimental.
948fec27c8498a797398bce42c8f2c080ce6eff496242f0e9479650cd681b6fa
['90a2f88b95b545a2a3aa0a20f4e247ab']
In all other areas of the UI, you're still voting to 'close' the question: And the votes are still 'close' votes: So once enough 'close' votes come in, the question is put 'on hold'. This seems consistent with the message in the on-hold box. It shouldn't be changed unless you change it everywhere. Like this: This would perhaps make it a bit more clear by completely eliminating the usage of the word 'close' in favor of 'on hold', but I doubt this is really causing enough confusion to warrant that.
06f2af74b7a1aa6fa947e72aecf1847b347df0a8b51abca00a8d65ce18bc0065
['90ae1cc5ac364dfda51e62b3497290fd']
Try setting the MaxRequestsPerChild variable in Apache, which will cause it to kill and start its children after they have served the specified number of requests. In mod_php, this can be as low as 100. PHP (especially mod_php) is known to do this. Alternatives include running PHP under FastCGI, which will prevent Apache from restarting and only restart the PHP interpreters. You should also insure that you always have RAM available. If this means less Apache forks running, then so be it. Clamp down on ServerLimit
844adbc0effeccb6bc0219960c465c9210d86ec5bb2416b6da9ca0ad7df0d3fb
['90ae1cc5ac364dfda51e62b3497290fd']
Simply put, there are two key-pairs for DHE_RSA instead one key-pair of RSA_RSA. For example, for AES128_CBC_SHA(long name is RSA_RSA_AES128_CBC_SHA), you have one key-pair for both key-exchange and authentication. for ECDHE_RSA_AES_CBC_SHA, you have two key-pairs. The ECC key-pair is temporary for key-exchange. The RSA key-pair from cert is used for authentication. As a result, for second case, it does not matter if you lose your RSA certificate private key.
8ed55c877819109d507ac732075ccdad683d95a6295bb4a56157f8042c1a4d8a
['90b148957082462496fd713d683d48e4']
Well, i don't fully agree, because this is not how the font looks when i try it out on myfonts, where i bought it. Putting weird swashes everywhere is objectively wrong, when i leave all settings in default. I expect to see the "Text" variant but I get the "Contextuals" variant. That is not a matter of opinion (this sentence is though).
47fa4badd9925cd142773d71e07b149d20edbdd7708ad94ae9e1e57ada728ee7
['90b148957082462496fd713d683d48e4']
Other popular blogging platforms include hosted software such as Textpattern and Movable Type; and non-hosted blogging platforms like Blogger, TypePad and Tumblr. Most of them include support for “themes” or “templates” that you can modify or design from scratch to match your website’s look and feel. Here are a few links to documentation on how to do this for Wordpress, Movable Type, Blogger, TypePad and Tumblr.
d4a3eb850d42cd945e7d0b67569b5884332a017c23f42d14c4ea4e6d8bf60a85
['90b57df5f0f54e84b6dc0ba224c4e23d']
I've got a clock in my widget that I'm making and I want it to update every minute in sync with the system clock. ACTION_TIME_TICK seems like the perfect solution however much of my research says it's impossible in an AppWidget while others say there are workarounds but their very vague. I'd prefer not to do an AlarmManager as I'd have to update very frequently to make sure that it changes minutes when the system clock changes minutes and that would drain the battery more. Is there a workaround for ACTION_TIME_TICK or what's the best way to update every minute in sync with the system clock with minimal battery drain?
7db26baf17ace447d5f702e6d301f9054a4c4ee2ca93b759f842aad01648e6b3
['90b57df5f0f54e84b6dc0ba224c4e23d']
I'm trying to figure out designing for multiple screen sizes/densities/etc. I thought "dp" was my answer but it's not working the way I thought it was going to. Here's what I'm trying to do: I have a header and footer section for menu items that remain static. Then I have a ScrollView between the 2. Within the ScrollView is several "blocks" that display various information. I want those blocks to always expand to the full width of the screen. I want the height of those blocks to simply scale appropriately to keep a proper 1:1 -> height:width scale. I also want the TextViews/Images/Buttons/etc to scale and keep their position within the block. If the Blocks height get too big for the screen, that's where the ScrollView comes in. If they fit just fine, that's OK too. I mainly want to scale to width and let the user Scroll if necessary. Currently if the screen gets wider, the Blocks get really wide but don't scale the height to match them in. Here's a basic (simplified for readabilities sake) rundown of what my XML layout code looks like. Also note that each block may be a different size. I'm not looking for a "take up 25%" solution. The blocks have fairly complex and completely different layouts within them. <LinearLayout> <RelativeLayout>Header stuff</RelativeLayout> <ScrollView> //height and width = match_parent width lower priority than header/footer <RelativeLayout android:layout_width="match_parent" android:layout_height="???" //Had been using a specified "dp" value but that didn't work like I thought. What goes here? > Block#1 with lots of TextViews, ImageViews and Buttons...etc </RelativeLAyout> <RelativeLayout> Block#2 </RelativeLAyout> <RelativeLayout> Block#3... etc </RelativeLAyout> </ScrollView> <RelativeLayout>Footer stuff</RelativeLayout> </LinearLayout>
13e58928b6ced5489e91b1e8b8bbaf5a82167bbaa8a0b305f796ec7f0f82a57b
['90ba882af81949b19ee76ff13ce8c687']
The assignment operation in pl/sql is := CREATE TRIGGER C3 BEFORE UPDATE OF rate ON Magazines FOR EACH ROW WHEN(:NEW.rate < :OLD.rate*0.75) BEGIN IF :NEW.rate < 0 THEN :NEW.rate := 0; RAISE_APPLICATION_ERROR(-20003, 'Rate should never be below 0.'); ELSE :NEW.rate := :OLD.rate*0.75; END;
116899c24431b4f11eb78e94e8e4c58fc27be453c86ad300dae0f4f680cce432
['90ba882af81949b19ee76ff13ce8c687']
When you have a select statement in a PL/SQL block, you have to provide somewhere to store the results. Try this. DECLARE x NUMBER := 0; cnt number; vname varchar2(100); BEGIN LOOP select view_name,count(*) into vname, cnt from VIEW_TABLE where id = x group by VIEW_NAME; x := x + 1; EXIT WHEN x > 10; END LOOP; END; Is this just a learning exercise? Because you don't do anything with the results. I would recommend also reading <PERSON> articles. Lots of good stuff in there.
f364230bd3db701ef9618f28196cd74b8bef2c90d92deb0f925a8c8aa44645cf
['90db127d8e2146ab85e48b3b0b5dbb9f']
I'm surprised I don't know how to do this, but as it turns out I really don't; simply put, I'm trying to make a side-scrolling shooter game, a basic one and in it, I have 50 stars spawned on-screen through a "for" loop upon the game starting. There is a function which does this and a listener is at the beginning. Problem is, when you lose the game and go back to main menu, 50 more stars would be spawned, which isn't what I want. So, I'm trying to make an "if" statement check at the beginning, so that the game checks whether there is an instance/movie clip of the star object/symbol before determining whether the function that spawns stars should be called out with a listener. So, how do I do this? I looked through some other checks and they didn't help as the codes presented were vastly different there and so I'm just getting errors. Let me know if a better explanation is needed or if you would like to see some of the code. Note that the game overall already has a lot of code, so just giving all of it would probably not be helpful.
3848108b1cdebe181e416a39bfb25dc7be965879e242f4b0d64e5b73e52ecf2c
['90db127d8e2146ab85e48b3b0b5dbb9f']
I've a bit of a problem trying to make a mod for a particular game. You might have heard of it, it's called Don't Starve Together. Inside the game's data, there's a file called tuning.lua which handles a lot of the initial variables. Inside of it is just a function, under which are some local variables and a table/array/list called TUNING, which contains a bunch of global variables. The local variables underneath the function I cannot access as they're local, but I can't change anything there either, because they are local variables. So, instead I'm working from within a completely different file, which inside my mod, called modmain.lua. So, my question is, how can I take a local variable from the function that is inside the tuning.lua script and change it/use it from within modmain.lua? Here's a snippet of tuning.lua code: TUNING = {} -- the table is created function Tune(overrides) if overrides == nil then overrides = {} end --the following are the local variables used in the game local seg_time = 30 local total_day_time = seg_time*16 local day_segs = 10 local dusk_segs = 4 local night_segs = 2 --default day composition. changes in winter, etc local day_time = seg_time * day_segs local dusk_time = seg_time * dusk_segs local night_time = seg_time * night_segs local multiplayer_attack_modifier = 1 local multiplayer_goldentool_modifier = 1 local multiplayer_armor_durability_modifier = 0.7 local multiplayer_armor_absorption_modifier = 1 local multiplayer_wildlife_respawn_modifier = 1 local wilson_attack = 34 * multiplayer_attack_modifier local wilson_health = 150 local calories_per_day = 75 local wilson_attack_period = .1 ----------------------- local perish_warp = 1--/200 TUNING = { --global variables go here } end So, lets say I wanted to take total_day_time and change it to 24 within modmain.lua. What code would I need to write there to do so? Or is this impossible? Basically, I'm trying to increase the amount of day segments (as well as extend the segment time) in the game and this seems to be the only place where it's accessed from. There is a mod out there that increases segment time, but there is no mod which increases segment amount. Here's segments that I'm talking about, in case you have no idea.
42127a95bf220d90b2f00f4b3d661f5a684f81b4a56907180f87619326bb632e
['90db8d8b380041f186abd64c51d7e868']
I want to send a json request and embedd a variable in the post data. I did a little research and I came up with the single quotes around the variable. #!/bin/bash FILENAME="/media/file.avi" curl -i -X POST -H "Content-Type: application/json" —d '{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item":{"file":"'$FILENAME'"}}}' http://<IP_ADDRESS>/jsonrpc Unfortunately I get some errors: curl: (6) Couldn't resolve host '—d' curl: (3) [globbing] nested braces not supported at pos 54 HTTP/1.1 200 OK Content-Length: 76 Content-Type: application/json Date: Wed, 29 Jan 2014 19:16:56 GMT {"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"} Appearently there are some problems with the braces and the http answer states, that the command could not be executed. What's wrong with my code here? Thanks! This is my curl version: curl 7.30.0 (mips-unknown-linux-gnu) libcurl/7.30.0 OpenSSL/0.9.8y Protocols: file ftp ftps http https imap imaps pop3 pop3s rtsp smtp smtps tftp Features: IPv6 Largefile NTLM NTLM_WB SSL
be0b9f43100324d98619994acfb1b4a54c93bdf3c3458b6c53b5158c78c2aece
['90db8d8b380041f186abd64c51d7e868']
In my bootstrapper Theme.xml I want to reference a path variable from a .wxs file. In Bundle.wxs I reference certain variables using the $() syntax. In my <BootstrapperApplicationRef> I use a ThemeFile. From there I want to use the same variables (for example var.BundelVersionNumber). How can I achieve that? Bundlex.wxs <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <Bundle Name="MyApplication $(var.BundelVersionNumber) ($(var.Platform))" I see that I can use some built-in burn variables, for example [WixBundleName ],: http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html
c918a48e56f66d5f69b912eee4442cbfc675900f402521f82a049973e54755a0
['90f163eece9e42cfaf2391d796d2d37b']
Let $f:(t_0-\varepsilon, t_0+\varepsilon)\to\mathbb{C}$, be an analytic application, such that: $f(t)=0\Longleftrightarrow\ t=t_0$. Is it true that there is an analytic function $g:(t_0-\varepsilon, t_0+\varepsilon)\to\mathbb{C}$ with $g(t_0)\neq 0$ so that: $\dfrac{f(t)}{|f(t)|}=g(t), \forall\ t\in (t_0-\varepsilon, t_0)$ and $\dfrac{f(t)}{|f(t)|}=\pm g(t), \forall\ t\in (t_0, t_0+\varepsilon)$? I'm studying the bike tire tracks, and I want to show that the front wheel does not have singularities even if the rear one can have cusp singularities. I need a result of that type to prove the assumption. I found it true for particular functions. Take $f(t)=(t, t^2)$, for example. Moreover, I have proved that the following two limits exists: $\lim\limits_{t\nearrow t_0}\dfrac{f(t)}{|f(t)|}$ and $\lim\limits_{t\searrow t_0}\dfrac{f(t)}{|f(t)|}$ and they are either equal or opposite.
408892d07539bccc337885c893c894cc806b36b464443d588ea65684cb1382fb
['90f163eece9e42cfaf2391d796d2d37b']
The feature you're describing is essentially a pretty version of "replace all", which Notepad++ and any decent text editor will have. I'm not aware of Notepad++ having the feature exactly as you describe it, so I'd just do a "Replace All". (btw, I'm using N++ version 5.8.7)
0342c9f64dc34bf1d6d9d217e6c49e13e4ea32c2c90054c6f13350e34273f6ad
['90f7770a78fc4f3085492cc270472c96']
you have to enable the output reports explicitly with jsChiliCat (Note the -junitReport and -coverage options in the example below). The options you provide to the chilicat jar command give you with the ability to set the location of your JS Src, Tests and Libraries. However the GitHub example is incorrect, you need to omit the '=' signs from the command line options. The following example worked for my POC project... java -jar lib/jschilicat-dist/libs/jschilicat.jar -chilicat -workingDir target -src src/js -src-test src/test -libs src/lib -junitReport -coverage HTH, Paul
48196c8b54eaf1dc22099de9e0f3ea1099f81402e016324c8f7c38eb02feb05d
['90f7770a78fc4f3085492cc270472c96']
I've just been struggling with using JSON as the DataSource to a Jasper Report and with a lack of decent examples on the Net I thought I would post this here for future reference. This example is how to use iReport Designer and a JSON DataSource. Firstly, the input JSON: { "userName": "Evil Raat", "details": { "email": "<EMAIL_ADDRESS>" } } Then create a JSON DataSource in iReport Designer and point it at your file (leaving all the other details as their defaults) Next you can use the following jrxml template to render the above JSON into a report: <?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="sample" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="a894078a-929b-4aae-a1d0-46485f0f8835"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString language="json"> <![CDATA[]]> </queryString> <field name="userName" class="java.lang.String"> <fieldDescription><![CDATA[userName]]></fieldDescription> </field> <field name="userEmail" class="java.lang.String"> <fieldDescription><![CDATA[details.email]]></fieldDescription> </field> <title> <band height="200" splitType="Stretch"> <textField> <reportElement uuid="3b74775b-4555-43c3-bdf2-1677145c8660" x="0" y="31" width="555" height="20"/> <textElement textAlignment="Right"> <font fontName="Helvetica" size="12" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$F{userName}]]></textFieldExpression> </textField> <textField> <reportElement uuid="aa6cc7c8-2ca1-4f0f-92e2-c466083daba0" x="0" y="54" width="555" height="20"/> <textElement textAlignment="Right"> <font fontName="Helvetica" size="12" isBold="true"/> </textElement> <textFieldExpression><![CDATA[$F{userEmail}]]></textFieldExpression> </textField> </band> </title> </jasperReport> NOTE: You must define the field elements first, before any they can be used. They should be the JSON path from the root of the JSON input file using standard dot notation. See the fieldDescription elements above for examples. Once your field is defined you can use its computed value in a text field or whatever: Hope that helps some people.
f33a3e364cd7dcabc9e6a94215d80ed208d2651da97fda5972076748a0535728
['90f86e867712449e851c9bfb2bf93d77']
I am developing one iOS application in wich I integrate FaceBook via Facebook iOS SDK 3.1. I want to change User created page information eg. Cover Photo, Profile Picture , Description, About etc. programmatically. I found some urls on http://developers.facebook.com/docs/reference/api/page/ but I dont't know How to use those urls with parameters.Any example is there for this type of functionality?
4b62c145e6fc8f15e5b944ec20e02604eab7c3576a70152c835aeb8c1170e172
['90f86e867712449e851c9bfb2bf93d77']
I am developing an App which has a search functionality for user's emails with Gmail Account, But I don't know exactly how to integrate Gmail account into my app and get the list of all emails. And Please let me know if any Search API is available of Gmail for iOS?
100afb49538a6b1cb697e912d67ee52f6be4e9f5fadf549a2cd468b12855411c
['90fc7143e4654f94a0fc683d0700963c']
Have you tried to use LINQ? using System; using System.Collections.Generic; using System.Linq; public class Program { public static void Main() { var charList = new List<char[]>(); // Initialize list of char array char[] array1 = { 's', 'a', 'm' }; char[] array2 = { 's', 'm', 'i', 't', 'h' }; char[] array3 = { 'c', 'o', 'o', 'l'}; // Add them charList.Add(array1); charList.Add(array2); charList.Add(array3); Console.WriteLine("--Before sorting--"); foreach (char[] item in charList) { Console.WriteLine(item); } // Sorting charList = charList.OrderBy(a => new string(a)).ToList(); Console.WriteLine("--After sorting--"); foreach (char[] item in charList) { Console.WriteLine(item); } } } Output: --Before sorting-- <PERSON>smith cool --After sorting-- cool sam smith Test here: https://dotnetfiddle.net/wcYSAE Edit: Although I am not clear based on your question, normally when I have to sort List, I prefer to use what C# has to offer instead of reinventing the wheel. regarding performance, other C# gurus can answer it for us.
c03721c283d5e6b90cc554b6278812d7d36cd66f9468843f39c0b95939cd18a1
['90fc7143e4654f94a0fc683d0700963c']
I found my solution by using StartActivity instead of LoadApplication. By creating a second activity: XamarinForms.cs this activity load the app() using System; using System.Collections.Generic; using System.Linq; using System.Text; using Android.App; using Android.Content; using Android.OS; using Android.Runtime; using Android.Views; using Android.Widget; namespace IndoFellowship.Droid { [Activity(Label = "XamarinForm")] public class XamarinForm : Xamarin.Forms.Platform.Android.FormsApplicationActivity { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); } } } MainActivity.cs instead of LoadApplication here, I am calling the second activity instead using Android.App; using Android.Content; using Android.Content.PM; using Android.OS; using Android.Text.Method; using Android.Widget; using Auth0.OidcClient; using IdentityModel.OidcClient; using System; using System.Collections.Generic; using System.Linq; using System.Text; using Xamarin.Forms; namespace IndoFellowship.Droid { // Define App icon and name [Activity( Label = "Indo App", MainLauncher = true, Icon = "@drawable/icon", LaunchMode = LaunchMode.SingleTask) ] public class MainActivity : global<IP_ADDRESS>Xamarin.Forms.Platform.Android.FormsApplicationActivity { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); global<IP_ADDRESS>Xamarin.Forms.Forms.Init(this, bundle); // Showing layout that I set SetContentView(Resource.Layout.Main); // Do login // Some codes // Done processing on Android, I need to load Xamarin.Forms LinearLayout mainLayout = (LinearLayout)FindViewById(Resource.Id.mainLayoutID); mainLayout.RemoveAllViews(); // Load App StartActivity(typeof(XamarinForms)); } } } May be this is not a best design since now I have two activities. Please let me know if you know better way to accomplish this. Thank you.
ed5dad6b928696cdbbf77f2f7ecad55c0f6df42c30fc1a757a814f42c7ce09b5
['9100e3072c5c45e38809affdb0b963c3']
When app is in background, onResume is not called but I get some kind of default notification in tray with blank icon and no image. When I click this notification, onResume is then called and app is opened but does not navigate to the correct route. Firebase message is behaving as expected when flutter app is in foreground. - onMessage is called and notification has icon and image in tray. I'm wondering if the setup for notification/messaging is in the wrong location. class NotificationIcon extends StatefulWidget { @override NotificationIconState createState() => NotificationIconState(); } class NotificationIconState extends State<NotificationIcon> { FirebaseMessaging firebaseMessaging = new FirebaseMessaging(); void fcmSubscribe() { ... } void fcmUnSubscribe() { ... } Future showBigPictureNotification(Map<String, dynamic> message) async { ... var bigPictureStyleInformation = new BigPictureStyleInformation( bigPicturePath, BitmapSource.FilePath, contentTitle: title, summaryText: messageText); var androidPlatformChannelSpecifics = new AndroidNotificationDetails( '', topic, messageText, style: AndroidNotificationStyle.BigPicture, styleInformation: bigPictureStyleInformation); var platformChannelSpecifics = new NotificationDetails(androidPlatformChannelSpecifics, null); await flutterLocalNotificationsPlugin.show( 0, title, messageText, platformChannelSpecifics); } @override void initState() { super.initState(); firebaseMessaging.configure( onMessage: (Map<String, dynamic> message) async { print("onMessage: $message"); currentMessage = message; await showBigPictureNotification(currentMessage); }, onLaunch: (Map<String, dynamic> message) async { print("onLaunch: $message"); currentMessage = message; await showBigPictureNotification(currentMessage); }, onResume: (Map<String, dynamic> message) async { print("onResume: $message"); currentMessage = message; await showBigPictureNotification(currentMessage); }, ); onSelectNotification(String payload) async { await navigatorKey.currentState.push(new MaterialPageRoute(...)); } firebaseMessaging.requestNotificationPermissions(); flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin(); var initializationSettingsAndroid = new AndroidInitializationSettings('ic_stat_fiber_new'); var initializationSettings = new InitializationSettings(initializationSettingsAndroid, null); flutterLocalNotificationsPlugin.initialize(initializationSettings, onSelectNotification: onSelectNotification); } @override Widget build(BuildContext context) { < widget > } } flutter doctor -v [√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.16299.1004], locale en-IE) • Flutter version 1.2.1 at flutter • Framework revision 8661d8aecd (8 weeks ago), 2019-02-14 19:19:53 -0800 • Engine revision 3757390fa4 • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb) [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at AppData\Local\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) • All Android licenses accepted. [√] Android Studio (version 3.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 31.1.1 • Dart plugin version 181.5656 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) [√] VS Code (version 1.32.3) • VS Code at \AppData\Local\Programs\Microsoft VS Code • Flutter extension version 2.24.0 [√] Connected device (1 available) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator) • No issues found! dependencies: flutter: sdk: flutter http: url_launcher: 4.2.0+3 flutter_image: ^1.0.0 path_provider: 0.4.1 flutter_downloader: 1.1.3 fluttertoast: ^2.2.11 pin_code_view: 0.1.0 image_picker: 0.4.12+1 firebase_core: 0.2.5+1 firebase_storage: 1.1.0+1 uuid: ^1.0.0 cupertino_icons: ^0.1.0 permission_handler: 1.0.1 transparent_image: 0.1.0 shared_preferences: 0.4.3 flutter_launcher_icons: ^0.7.0 firebase_messaging: 2.1.0 flutter_local_notifications: 0.4.5 On older versions of some dependencies due to AndroidX issue. Working Notification when app in foreground working_notificaiton Not working Notification when app in foreground not_working_notification
a96eed4f4a22370c10d93ab3654ddf416f710f2f36829ae3bbe577ca7ab6dc8a
['9100e3072c5c45e38809affdb0b963c3']
For all those that may have lost days like me to this issue. The notification I was sending had a parent 'notification' object when it should have been 'data' object. From this answer here: https://stackoverflow.com/a/52116944/1295611 As pointed out by @boformer this only applies for 'Notification' messages. If you're sending 'Data' messages, no notification is created and the messages are delivered only through onMessage. More details in the plugin readme and firebase docs. That's why onMessage was behaving as expected using my code for creating the notification but onResume was using the default notification.
6da6ab65fa036f81aa2e7801c7e24c41aa9e8687401b27b8ae7b0854989d6083
['91080d511c4241499d32ae70252eba55']
One way would be to do 5 case when statements in your select. You can do something like (Case When session_from > 04:00:00 and session_to < 05:10:00 Then tapping_on End) A (Case When session_from > 05:00:00 and session_to < 06:10:00 Then tapping_on End) B etc. You essentially make the columns and then display whatever value you want in them, tapping_on in this case.
3f5a8e6bb3e14b8576d7df92aa070d3b5b46d872ca7910a5f4c144906ee2009f
['91080d511c4241499d32ae70252eba55']
I am creating a table to house my XML data that is coming in to my SQL Server database. Below is my code for my Create Table statement. My issue is I want to create a primary key that is a combination of two columns (SpecNum and IssueNum). A record should look like this (50125-001). However I am having issue with type mismatches and it will not allow my to declare it as xml. Does anyone know how to correct this? Please see code below and thank you in advance. CREATE TABLE ImportXML ( SpecNum xml, IssueNum xml, SpecStatus xml, ID as (SpecNum + '-' + IssueNum) NOT NULL PRIMARY KEY );
ae8f25ce9db2fb79a454c0af2e3de06d483972dd90075df5ca3928035f1912d8
['910bfd95add4474cadb760fd1cee521e']
I followed all the steps which are listed here , but I don't know why I am not able to build the project. I got some compiler errors as /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/Script-9069D08A0FCE185A0042E34C.sh: ./configure: /bin/sh^M: bad interpreter: No such file or directory According to this compiler is not able to find a file named "Script-9069D08A0FCE185A0042E34C.sh" which results in error Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure and finally failing compiling with exit code 1 Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1 output of compiler is as PhaseScriptExecution "Run Script" /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/Script-9069D08A0FCE185A0042E34C.sh cd /Users/macbook2/SQLCipher2 setenv ACTION build setenv ALTERNATE_GROUP staff setenv ALTERNATE_MODE u+w,go-w,a+rX setenv ALTERNATE_OWNER macbook2 setenv ALWAYS_SEARCH_USER_PATHS YES setenv APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developer setenv APPLE_INTERNAL_DIR /AppleInternal setenv APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentation setenv APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Library setenv APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Tools setenv APPLY_RULES_IN_COPY_FILES NO setenv ARCHS i386 setenv ARCHS_STANDARD_32_BIT i386 setenv ARCHS_UNIVERSAL_IPHONE_OS i386 setenv AVAILABLE_PLATFORMS "iphonesimulator macosx iphoneos" setenv BUILD_COMPONENTS "headers build" setenv BUILD_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products setenv BUILD_ROOT /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products setenv BUILD_STYLE setenv BUILD_VARIANTS normal setenv BUILT_PRODUCTS_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products/Debug-iphonesimulator setenv CACHE_ROOT /var/folders/lq/qxx4dw1s2_957n31bhdw38400000gn/C/com.apple.Xcode.501 setenv CCHROOT /var/folders/lq/qxx4dw1s2_957n31bhdw38400000gn/C/com.apple.Xcode.501 setenv CHMOD /bin/chmod setenv CHOWN /usr/sbin/chown setenv CLASS_FILE_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/JavaClasses setenv CLEAN_PRECOMPS YES setenv CLONE_HEADERS NO setenv CODESIGNING_FOLDER_PATH /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products/Debug-iphonesimulator/ setenv COMBINE_HIDPI_IMAGES YES setenv COMMAND_MODE legacy setenv COMPOSITE_SDK_DIRS /var/folders/lq/qxx4dw1s2_957n31bhdw38400000gn/C/com.apple.Xcode.501/CompositeSDKs setenv COMPRESS_PNG_FILES YES setenv CONFIGURATION Debug setenv CONFIGURATION_BUILD_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products/Debug-iphonesimulator setenv CONFIGURATION_TEMP_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator setenv COPYING_PRESERVES_HFS_DATA NO setenv COPY_PHASE_STRIP NO setenv COPY_RESOURCES_FROM_STATIC_FRAMEWORKS YES setenv CP /bin/cp setenv CURRENT_ARCH i386 setenv CURRENT_VARIANT normal setenv DEAD_CODE_STRIPPING NO setenv DEBUGGING_SYMBOLS YES setenv DEBUG_INFORMATION_FORMAT dwarf-with-dsym setenv DEFAULT_COMPILER com.apple.compilers.llvm.clang.1_0 setenv DEPLOYMENT_LOCATION NO setenv DEPLOYMENT_POSTPROCESSING NO setenv DERIVED_FILES_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/DerivedSources setenv DERIVED_FILE_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/DerivedSources setenv DERIVED_SOURCES_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/DerivedSources setenv DEVELOPER_APPLICATIONS_DIR /Applications/Xcode.app/Contents/Developer/Applications setenv DEVELOPER_BIN_DIR /Applications/Xcode.app/Contents/Developer/usr/bin setenv DEVELOPER_DIR /Applications/Xcode.app/Contents/Developer setenv DEVELOPER_FRAMEWORKS_DIR /Applications/Xcode.app/Contents/Developer/Library/Frameworks setenv DEVELOPER_FRAMEWORKS_DIR_QUOTED "\"/Applications/Xcode.app/Contents/Developer/Library/Frameworks\"" setenv DEVELOPER_LIBRARY_DIR /Applications/Xcode.app/Contents/Developer/Library setenv DEVELOPER_SDK_DIR /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs setenv DEVELOPER_TOOLS_DIR /Applications/Xcode.app/Contents/Developer/Tools setenv DEVELOPER_USR_DIR /Applications/Xcode.app/Contents/Developer/usr setenv DEVELOPMENT_LANGUAGE English setenv DO_HEADER_SCANNING_IN_JAM NO setenv DSTROOT /tmp/sqlcipher.dst setenv DT_TOOLCHAIN_DIR /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain setenv DWARF_DSYM_FILE_NAME .dSYM setenv DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT NO setenv DWARF_DSYM_FOLDER_PATH /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products/Debug-iphonesimulator setenv EFFECTIVE_PLATFORM_NAME -iphonesimulator setenv ENABLE_HEADER_DEPENDENCIES YES setenv EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS ".DS_Store .svn .git .hg CVS" setenv EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES "*.nib *.lproj *.framework *.gch (*) .DS_Store CVS .svn .git .hg *.xcodeproj *.xcode *.pbproj *.pbxproj" setenv FILE_LIST /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/Objects/LinkFileList setenv FIXED_FILES_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/FixedFiles setenv FRAMEWORK_VERSION A setenv GCC3_VERSION 3.3 setenv GCC_C_LANGUAGE_STANDARD c99 setenv GCC_DYNAMIC_NO_PIC NO setenv GCC_OBJC_LEGACY_DISPATCH YES setenv GCC_OPTIMIZATION_LEVEL 0 setenv GCC_PFE_FILE_C_DIALECTS "c objective-c c++ objective-c++" setenv GCC_TREAT_WARNINGS_AS_ERRORS NO setenv GCC_VERSION com.apple.compilers.llvm.clang.1_0 setenv GCC_WARN_ABOUT_RETURN_TYPE YES setenv GCC_WARN_UNUSED_VARIABLE YES setenv GENERATE_MASTER_OBJECT_FILE NO setenv GENERATE_PKGINFO_FILE NO setenv GENERATE_PROFILING_CODE NO setenv GID 20 setenv GROUP staff setenv HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT YES setenv HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES YES setenv HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS YES setenv HEADERMAP_INCLUDES_PROJECT_HEADERS YES setenv HEADER_SEARCH_PATHS " /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include" setenv ICONV /usr/bin/iconv setenv INFOPLIST_EXPAND_BUILD_SETTINGS YES setenv INFOPLIST_OUTPUT_FORMAT binary setenv INFOPLIST_PREPROCESS NO setenv INSTALL_DIR /tmp/sqlcipher.dst setenv INSTALL_GROUP staff setenv INSTALL_MODE_FLAG u+w,go-w,a+rX setenv INSTALL_OWNER macbook2 setenv INSTALL_ROOT /tmp/sqlcipher.dst setenv IPHONEOS_DEPLOYMENT_TARGET 6.1 setenv JAVAC_DEFAULT_FLAGS "-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8" setenv JAVA_APP_STUB /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub setenv JAVA_ARCHIVE_CLASSES YES setenv JAVA_ARCHIVE_TYPE JAR setenv JAVA_COMPILER /usr/bin/javac setenv JAVA_FRAMEWORK_RESOURCES_DIRS Resources setenv JAVA_JAR_FLAGS cv setenv JAVA_SOURCE_SUBDIR . setenv JAVA_USE_DEPENDENCIES YES setenv JAVA_ZIP_FLAGS -urg setenv JIKES_DEFAULT_FLAGS "+E +OLDCSO" setenv KEEP_PRIVATE_EXTERNS NO setenv LD_GENERATE_MAP_FILE NO setenv LD_MAP_FILE_PATH /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/amalgamation-LinkMap-normal-i386.txt setenv LD_NO_PIE NO setenv LEGACY_DEVELOPER_DIR /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer setenv LEX lex setenv LINKER_DISPLAYS_MANGLED_NAMES NO setenv LINK_FILE_LIST_normal_i386 setenv LINK_WITH_STANDARD_LIBRARIES YES setenv LOCAL_ADMIN_APPS_DIR /Applications/Utilities setenv LOCAL_APPS_DIR /Applications setenv LOCAL_DEVELOPER_DIR /Library/Developer setenv LOCAL_LIBRARY_DIR /Library setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv MAC_OS_X_PRODUCT_BUILD_VERSION 11G63 setenv MAC_OS_X_VERSION_ACTUAL 1075 setenv MAC_OS_X_VERSION_MAJOR 1070 setenv MAC_OS_X_VERSION_MINOR 0705 setenv NATIVE_ARCH i386 setenv NATIVE_ARCH_32_BIT i386 setenv NATIVE_ARCH_64_BIT x86_64 setenv NATIVE_ARCH_ACTUAL x86_64 setenv NO_COMMON YES setenv OBJC_ABI_VERSION 2 setenv OBJECT_FILE_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/Objects setenv OBJECT_FILE_DIR_normal /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/Objects-normal setenv OBJROOT /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates setenv ONLY_ACTIVE_ARCH YES setenv OPENSSL_SRC /Users/macbook2/MyApp/openssl-1.0.0e setenv OPTIMIZATION_LEVEL 0 setenv OS MACOS setenv OSAC /usr/bin/osacompile setenv PASCAL_STRINGS YES setenv PATH "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/usr/bin:/bin:/usr/sbin:/sbin" setenv PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms" setenv PKGINFO_FILE_PATH /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/PkgInfo setenv PLATFORM_DEVELOPER_APPLICATIONS_DIR /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications setenv PLATFORM_DEVELOPER_BIN_DIR /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin setenv PLATFORM_DEVELOPER_LIBRARY_DIR /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library setenv PLATFORM_DEVELOPER_SDK_DIR /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs setenv PLATFORM_DEVELOPER_TOOLS_DIR /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools setenv PLATFORM_DEVELOPER_USR_DIR /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr setenv PLATFORM_DIR /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform setenv PLATFORM_NAME iphonesimulator setenv PLATFORM_PREFERRED_ARCH i386 setenv PLATFORM_PRODUCT_BUILD_VERSION 10B141 setenv PLATFORM_VERSION_AVAILABILITY_H_FORMAT 60100 setenv PLIST_FILE_OUTPUT_FORMAT binary setenv PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR YES setenv PRECOMP_DESTINATION_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/PrefixHeaders setenv PRESERVE_DEAD_CODE_INITS_AND_TERMS NO setenv PRODUCT_NAME amalgamation setenv PRODUCT_SETTINGS_PATH setenv PROFILING_CODE NO setenv PROJECT sqlcipher setenv PROJECT_DERIVED_FILE_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/DerivedSources setenv PROJECT_DIR /Users/macbook2/SQLCipher2 setenv PROJECT_FILE_PATH /Users/macbook2/SQLCipher2/sqlcipher.xcodeproj setenv PROJECT_NAME sqlcipher setenv PROJECT_TEMP_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build setenv PROJECT_TEMP_ROOT /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates setenv RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS YES setenv REMOVE_CVS_FROM_RESOURCES YES setenv REMOVE_GIT_FROM_RESOURCES YES setenv REMOVE_HG_FROM_RESOURCES YES setenv REMOVE_SVN_FROM_RESOURCES YES setenv REZ_COLLECTOR_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/ResourceManagerResources setenv REZ_OBJECTS_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/ResourceManagerResources/Objects setenv RUN_CLANG_STATIC_ANALYZER NO setenv SCAN_ALL_SOURCE_FILES_FOR_INCLUDES NO setenv SCRIPT_INPUT_FILE_0 /Users/macbook2/SQLCipher2/sqlite3.c setenv SCRIPT_INPUT_FILE_COUNT 1 setenv SCRIPT_OUTPUT_FILE_0 /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products/Debug-iphonesimulator/libsqlcipher.a setenv SCRIPT_OUTPUT_FILE_COUNT 1 setenv SDKROOT /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk setenv SDK_DIR /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk setenv SDK_NAME iphonesimulator6.1 setenv SDK_PRODUCT_BUILD_VERSION 10B141 setenv SED /usr/bin/sed setenv SEPARATE_STRIP NO setenv SEPARATE_SYMBOL_EDIT NO setenv SET_DIR_MODE_OWNER_GROUP YES setenv SET_FILE_MODE_OWNER_GROUP NO setenv SHARED_DERIVED_FILE_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products/Debug-iphonesimulator/DerivedSources setenv SHARED_PRECOMPS_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/PrecompiledHeaders setenv SKIP_INSTALL YES setenv SOURCE_ROOT /Users/macbook2/SQLCipher2 setenv SRCROOT /Users/macbook2/SQLCipher2 setenv STRINGS_FILE_OUTPUT_ENCODING binary setenv STRIP_INSTALLED_PRODUCT YES setenv STRIP_STYLE all setenv SUPPORTED_DEVICE_FAMILIES "1 2" setenv SUPPORTED_PLATFORMS "iphonesimulator macosx iphoneos" setenv SYMROOT /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products setenv SYSTEM_ADMIN_APPS_DIR /Applications/Utilities setenv SYSTEM_APPS_DIR /Applications setenv SYSTEM_CORE_SERVICES_DIR /System/Library/CoreServices setenv SYSTEM_DEMOS_DIR /Applications/Extras setenv SYSTEM_DEVELOPER_APPS_DIR /Applications/Xcode.app/Contents/Developer/Applications setenv SYSTEM_DEVELOPER_BIN_DIR /Applications/Xcode.app/Contents/Developer/usr/bin setenv SYSTEM_DEVELOPER_DEMOS_DIR "/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples" setenv SYSTEM_DEVELOPER_DIR /Applications/Xcode.app/Contents/Developer setenv SYSTEM_DEVELOPER_DOC_DIR "/Applications/Xcode.app/Contents/Developer/ADC Reference Library" setenv SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR "/Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools" setenv SYSTEM_DEVELOPER_JAVA_TOOLS_DIR "/Applications/Xcode.app/Contents/Developer/Applications/Java Tools" setenv SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR "/Applications/Xcode.app/Contents/Developer/Applications/Performance Tools" setenv SYSTEM_DEVELOPER_RELEASENOTES_DIR "/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes" setenv SYSTEM_DEVELOPER_TOOLS /Applications/Xcode.app/Contents/Developer/Tools setenv SYSTEM_DEVELOPER_TOOLS_DOC_DIR "/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools" setenv SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR "/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools" setenv SYSTEM_DEVELOPER_USR_DIR /Applications/Xcode.app/Contents/Developer/usr setenv SYSTEM_DEVELOPER_UTILITIES_DIR /Applications/Xcode.app/Contents/Developer/Applications/Utilities setenv SYSTEM_DOCUMENTATION_DIR /Library/Documentation setenv SYSTEM_LIBRARY_DIR /System/Library setenv TARGETED_DEVICE_FAMILY 1 setenv TARGETNAME amalgamation setenv TARGET_BUILD_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Products/Debug-iphonesimulator setenv TARGET_NAME amalgamation setenv TARGET_TEMP_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build setenv TEMP_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build setenv TEMP_FILES_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build setenv TEMP_FILE_DIR /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build setenv TEMP_ROOT /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates setenv TEST_AFTER_BUILD NO setenv TOOLCHAINS com.apple.dt.toolchain.XcodeDefault setenv UID 501 setenv UNSTRIPPED_PRODUCT NO setenv USER macbook2 setenv USER_APPS_DIR /Users/macbook2/Applications setenv USER_LIBRARY_DIR /Users/macbook2/Library setenv USE_DYNAMIC_NO_PIC YES setenv USE_HEADERMAP YES setenv USE_HEADER_SYMLINKS NO setenv VALIDATE_PRODUCT NO setenv VALID_ARCHS i386 setenv VERBOSE_PBXCP NO setenv VERSION_INFO_BUILDER macbook2 setenv VERSION_INFO_FILE amalgamation_vers.c setenv VERSION_INFO_STRING "\"@(#)PROGRAM:amalgamation PROJECT:sqlcipher-\"" setenv XCODE_APP_SUPPORT_DIR /Applications/Xcode.app/Contents/Developer/Library/Xcode setenv XCODE_PRODUCT_BUILD_VERSION 4H1503 setenv XCODE_VERSION_ACTUAL 0463 setenv XCODE_VERSION_MAJOR 0400 setenv XCODE_VERSION_MINOR 0460 setenv YACC yacc /bin/sh -c /Users/macbook2/Library/Developer/Xcode/DerivedData/MyApp-acboozafiejdawbpwucjmgcisgvy/Build/Intermediates/sqlcipher.build/Debug-iphonesimulator/amalgamation.build/Script-9069D08A0FCE185A0042E34C.sh could you please help me to solve this problem. Thanks in advance
4837d73907df7090d6e2dcf3e33b335371cb25a268a271cfdd1e37a304c26039
['910bfd95add4474cadb760fd1cee521e']
First define a dummy url #define kDummyURL @"dummyurl://dummy" Then in view did load add a javascript -(void)webViewDidFinishLoad:(UIWebView *)webView{ [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"$(function(){$('input, textarea').keypress(function() {window.location = \"%@\";});})",kDummyURL]]; } and in should Start load with request try to capture that dummyurl which will be fired by javascript you just added - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{ if ([[request.URL absoluteString] isEqualToString:kDummyURL]) { //key is pressed on HTML page, here you can implement what you want return NO; } return YES: }
5fc89fde079e5886f2dba3075d79bd4b42f131be4999247e92f20c57d203f2a7
['911e0997d6a74129a4238d30c5a8eb98']
I want to pass a javascript function to a dynamically created div, like I am attempting below. If I replace the script string with an ordinary string this works, but is there a way to pass a JS script in createTextNode? newDiv = document.createElement("div"); newContent = document.createTextNode("<script type=\"text/javascript\">var pager = new Pager(3); pager.init(); pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1); </script>"); newDiv.appendChild(newContent); TIA
a9b910c850cd67527109ffe14ca65745ae6d052b525fb423a9de44429bf1c7be
['911e0997d6a74129a4238d30c5a8eb98']
You can play around with width and height percentages & width and height values in options variable and even push the legend to bottom as one single line. Then pass the options to the chart you are drawing. var options2 = { width: 265, height: 200, chartArea: { left: 60, top: 20, width: "100%", height: "60%" }, isStacked: true, allowHtml: true, 'legend': 'bottom', titleTextStyle: { color: 'green', fontFamily: 'Arial', fontSize: 16 }, legendTextStyle: { color: '#666666' }, vAxis: { title: 'Liters', titleTextStyle: { color: 'blue', fontName: 'Arial', fontSize: 10 }, textStyle: { fontSize: 9} },