Updating an ICS calendar event in Outlook using another ICS file?

outlook
Question: I send an email with an ICS file for an event that has the UID set to the event Id. Then I update event and send an email with a new ICS file that has the same UID. Google Calendar updates the already existing event on my calendar due to the same UID. However, Outlook creates a brand new event and leaves the old one there... How do you make sure an event is updated when opening an ICS in Outlook if one with the same UID exists already on the calendar? Answer: Read more
Read More

Quill Blog – Responsive Minimal WordPress Blog theme

Uncategorized
Quillis a reader friendly , modern, clean, and content focus WordPress blog theme. It is 100% responsive means it will fit in various device of different size. It supports all type of post format. It is simple and it’s elegant. Using Quill you can setup a beautiful personal blog or magazine blog. Theme options are directly incorporated with WordPress customizer itself. Mino is suitable for any kind of personal or travel, hobby, tutorial blog / magazine.
Read More

Melt and Merge on Substring – Python & Pandas

Uncategorized
Question: I have data which has data like id name model_# ms bp1 cd1 sf1 sa1 rq1 bp2 cd2 sf2 sa2 rq2 ... 1 John 23984 1 23 234 124 25 252 252 62 194 234 234 ... 2 John 23984 2 234 234 242 62 262 622 262 622 26 262 ... for hundreds of models with up to 10 ms and variables counting up to 21. I have usually used pd.melt for doing my analysis where i look at bp1:bp21 or whatever. I currently have a need to create a melt where I look at bp1 values along with rq 1 values. I am looking to effectively create something like this: id model_# ms variable_x value_x variable_y value_y 0 113 77515 1 bp1 23 rq1 252 1 113…
Read More

Spiderweb – Responsive Personal Portfolio Template

Uncategorized
Spiderweb is a simple, creative and responsive personal template with beautiful portfolio with sliding effect and has contact information with Google map. Spiderweb is a great way of showcasing your creative work and your services in style. This template comes with default 6 colors and further can be customized by changing the hex color codes with whichever color you like.
Read More

Scrapy returns repeated out of order results when using a for loop, but not when going link by link

python
Question: I am attempting to use Scrapy to crawl a site. Here is my code:import scrapy class ArticleSpider(scrapy.Spider):name = "article" start_urls = [ 'http://www.irna.ir/en/services/161', ] def parse(self, response):for linknum in range(1, 15):next_article = response.xpath('//*[@id="NewsImageVerticalItems"]/div[%d]/div[2]/h3/a/@href' % linknum).extract_first() next_article = response.urljoin(next_article) yield scrapy.Request(next_article) for text in response.xpath('//*[@id="ctl00_ctl00_ContentPlaceHolder_ContentPlaceHolder_NewsContent4_BodyLabel"]'):yield { 'article': text.xpath('./text()').extract() } for tag in response.xpath('//*[@id="ctl00_ctl00_ContentPlaceHolder_ContentPlaceHolder_NewsContent4_bodytext"]'):yield { 'tag1': tag.xpath('./div[3]/p[1]/a/text()').extract(), 'tag2': tag.xpath('./div[3]/p[2]/a/text()').extract(), 'tag3': tag.xpath('./div[3]/p[3]/a/text()').extract(), 'tag4': tag.xpath('./div[3]/p[4]/a/text()').extract() } yield response.follow('http://www.irna.ir/en/services/161', callback=self.parse) But this returns in the JSON a weird mixture of repeated items, out of order and often skipping links: https://pastebin.com/LVkjHrRt However, when I set linknum to a single number, the code works fine. Why is iterating changing my results? Answer: Read more
Read More

Unable to upload a large number of files on Windows Chrome or IE but works on Firefox (64 bit)

Uncategorized
Question: Is there a limit to the max number of files I can upload/select using a HTML input element? It appears that on Windows 64 bit selecting a large number of files fails on Chrome and IE but works on Firefox. Is this a browser limitation? The is a similar question What is the max number of files to select in an HTML5 [multiple] file input? but I want to check if on 64 bit it should work? Answer: Read more
Read More

User input to select powerpoint presentation

Uncategorized
Question: I've created a macro that helps with a powerpoint presentation that needs to be updated every so often. Rather than going into the visual basic editor and importing the macro each time I'd like to create a button in a separate presentation which will prompt the user to click on the presentation that the macro needs to work on. Similar to having an excel document with just a single button on it to work on a workbook. A code I have that does something similar in excel (gets user to click on a sheet and activates and runs macro on sheet) is below. Dim uiSheet As Worksheet On Error Resume Next Set uiSheet = Application.InputBox("Select a cell on the key sheet.", Type:=8).Parent On Error GoTo 0 If uiSheet Is…
Read More

generate date range base on integers

Uncategorized
Question: I have an array like this [0,1,2,3 .. 23] and they means hour in a day. How to use moment js to convert them to 12 hour then do date range? my desire output is ['12am-1am','1am-2am','2am-3am' .. 11pm-12am] my attempt failed coz I thought I don't need moment https://jsfiddle.net/s4L7hj1a Answer: You don't need moment.js var getFormattedHour = function(hour) { return (hour % 12 ? hour % 12 : 12) + ':00 ' + ((hour < 12) || (hour >= 24) ? 'AM' : 'PM'); } var getHourRange = function(hour) { return getFormattedHour(hour) + ' - ' + getFormattedHour(hour + 1); } var hours = []; for(var hour = 0; hour < 24; hour++) { hours.push(hour); } hours.map(function(hour) { console.log(getHourRange(hour)); }); Read more
Read More

How can I get img src using php domxpath

Uncategorized
Question: I want to get the img src value using domxpath. Let us say I have this sample.html page: Sample 1 Sample 2 Sample 3 Using CURL, DOMDocument and DOMXPath I want to get the img src and the title:$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://path/to/sample.html'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = curl_exec($ch); curl_close($ch); $dom = new DOMDocument(); $dom->loadHTML($result); $xpath = new DOMXPath($dom); $entries = $xpath->query('//div[@id="wrapper"]/div[@class="item"]'); $results = array(); foreach ($entries as $entry) { $result = array(); $result['img'] = $xpath->query("img", $entry)->item(0)->nodeValue; $result['title'] = $xpath->query("p[@class='title']", $entry)->item(0)->nodeValue; $results[] = $result; } return $results; This will result to img as null:[ { "img": null, "title": "Sample 1" }, { "img": null, "title": "Sample 2" }, { "img": null, "title": "Sample 3" } ] Please help me…
Read More

Install Monogame on Visual Studio 2017

Uncategorized
Question: I am trying to install Monogame on VS 2017 however the option on the installer for VS 2017 is greyed out, even though I have VS 2017 installed. I also have VS 2015 and VS 2010 however I am not sure if it is those that are causing a problem. The version of MonoGame is 3.6.0.1625 and I currently have the directory: C:UsersMY NAMEDocumentsVisual Studio 2017TemplatesProjectTemplatesVisual C# Please help thanks Answer: This problem often happens when your templates are in the wrong directory. The path you provided seems to be the right one tho. Are your VS2015 templates in the C:UsersMY NAMEDocuments directory aswell ? If not, try to move your VS2017 templates to the same directory as your VS2015 templates. If those two are both in C:UsersMY NAMEDocuments,…
Read More