tag:blogger.com,1999:blog-85740133752537444232024-03-13T02:23:19.351-05:00IT tidbitIdea and thoughts about ITDuncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.comBlogger60125tag:blogger.com,1999:blog-8574013375253744423.post-81735525442475190172021-11-11T12:41:00.002-06:002021-11-11T12:51:24.796-06:00Firefox - set new tab to Google on Linux Mint<p>Firefox was one of the connerstond of the Open Source movement. It has a very positive impact on the web browser world and, hence, our life in general.
</p>
<p>The fact that Firefox earned the market share from Microsoft has forced the Microsoft to change its behavior toward the web standards and taking a much cooperative behavior. Because that shift of behaviors, the web standards was able to move forward in a more consistant way and that benefits the general public a lot. Just imaging a world where you will need to track which website needs which browser. Firefox has continued to be one of my favorite even though for some other reasons, I have used Firefox less for a while - still like it a lot with all of its extensions.</p>
<p>Recently, I converted one of my old computer to Linux Mint and, with no surprise, the machine come with Firefox as the default browser. I was happy to get back to use the Firefox as my browser.
</p>
<p>Unfortunately, when I begin to customize the browser to my taste, I notice that I have trouble to set the default website when I open a new browser tab. You got two choice there - a Firefox screen, or a blank screen. Even though, recently, I have second thoughts on using Google as my primary search engine, I was trying to start with it as the default page for the new browser tab.
</p>
<p>At that point, I was quite disapointed: In my mind, Firefox is an Open Source crown and I expected it to keep an open mind or the freedom spirit, which, to me, means to give users more freedom to control the settings.
</p>
<p>Not surprisingly, I went to Google for help. With that, I found <a href='https://support.mozilla.org/en-US/questions/1085259'>articles</a> that basically pointed to a Firefox extension that can help user set the new tab to a different website. In the meantime, I also look up for other browsers offered by the Linux community. I end up installed the Chromium. The Chromium isn't really a Google Chrome but is the Open Source code Google contributed to the Open Source community from its Chrome project.
</p>
<p>Not wanting to give up on Firefox, I played with the Firefox a bit more and found that Firefox has gone to the extend that Google is not listed in the search engine by default. You will need to go through the process of 'Find more search engines' on its setting pages to finally add Google as one of the search engine.
</p>
<pre>
Basically, you go to Settings, select Search from the sidebar,
scroll down to 'Find more search engines' and this direct you
to a Linux Mint page. Scroll all the way down and follow the
instruction to, finally, add the Google as a search engine.
Once you got the Google search engine added, you can set it as
the default.
Back to the new tab setting for the Firefox, you can use Firefox
default page, checked off all extra, and save.
Now, after you open the new tab, you still see Firefox logos.
But, at least, when you search, it is a Google search.
</pre>
<p>Throgh the above process, I learned that the 'Open Source' ironic is the motivation. However, I feel it probably went too far. I understand that we like to remind users that use the Open Source software the importance of the Open Source. But I really wondering if the current practice doing a dis-service to that goal. As you can see, people will try their way to get what they want - like install the extension or install a different browser. With all these extra works, I wonder how many will stay with Firefox and allows Firefox to, again, be the favorite browser.
</p>
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-70121993040521390282020-09-03T00:25:00.002-05:002020-09-10T07:56:24.364-05:00Contemporary State Of App. Development and REST API<div style="font-family: Arial, Helvetica, sans-serif;">
<p>As contemporary application developers and architects, we all feel overwhelmed with all the new 'stuffs' that are throwing at us - the new frameworks, the new 'standards', the new 'thoughts', and the new 'ways' of doing things.
</p>
<p>However, application developers and architects are not in the fashion business, we do not, and, should not, blindly adopt all the new stuffs. The logical approach is what we should do.
</p>
<p>For example, there was this new XHTML 'standard', and, there were many books and hypes following it. However, in the end, the XHTML is pretty much dead. The lesson learned is that new 'stuffs' must pass practical tests. Just be new and labeled 'standard' does not cut it.
</p>
<p>In the world of application development, there are many 'standards' that are basically doing the same thing. For example, the JSON and YAML are basically doing the same thing. Adopting one or the other would not really a matter of live or death. As to the case of XHTML and HTML5, the situation is a bit different. The limitation and feature matters - if you follow one, you may not get the feature or benefit of the other. For both cases above, these are physical limitations. Once you adopted, you take what is come with it.
</p>
<p>New thoughts or practices, on the other hand, are not one or nothing. People do not have to adopt the whole thing to take advantage of them. The RESTful API, as was defined by Roy Fielding in his 2000 PhD dissertation is a good example.</p>
<p>The trend of thoughts of the RESTful API is heavily trending on the HTTP protocol. The 'standard/practices' try to use/adopt/fit the use of HTTP's features, where the idea of stateless is not necessary new, but is an emphasized feature. The idea of API or 'Client-Server' architect isn't new either. It actually existed for a long time. Even the use of plain text as the communication medium is an old practice. However, the increasing processing power and network bandwidth made the practice much feasible.
</p>
<p>The RESTful API had been new and trended for a while. However, as of this writing, along with my previous article <a href="http://ittidbit.blogspot.com/2018/08/rest-or-representational-state-transfer.html">REST or Representational state transfer</a>, we have seen deviant from the practice of the REST API. For example, the Graph API and GraphQL API.</p>
<p>Personally, from the philosophic point of views, I really am questioning REST's strong adoption of the HTTP protocol. For one, the HTTP was not designed to facilitate the 'Client-Serve' application architect to begin with. Second, the 'cast' to follow GET/PUT/POST/DELETE keyword's original purpose is just so artificial and does not gear toward improving 'Client-Server' architecture. The use of GET with query string is an obvious example - see the next paragraph.
</p>
<p>As of today, the object oriented programming is largely the accepted best practice. The basic practice of object oriented programming is to group related data into an object instead of treat them as individual data items. Of course, for complex objects, objects can be nested, and the data are, therefore, nested too. The HTTP GET query string, by its design, there is no nested or structured data. By requiring transferring data with query string, the sending and receiving ends are forced to unpack and repack the data to facilitate the object oriented practice, while the POST keyword can easily send structured objects via JSON or other means.
</p>
<p>As mentioned earlier, the REST API is a practice, and there really isn't the need to adopt it in full in order to take the advantage of it.
</p>
<p>The doctrine of using GET/POST/PUT/DELETE keywords also does not make sense in that it limited the possible operations to create, read, update and delete - aka CRUD. However, as we all know, there are many operations that are required to build an effective Client-Server applications. With REST API, it is a common practice to pass parameters/flags to fine tune the desired operations and the adoption of the doctrine of GET/POST/PUT/DELETE forced the application to check for desired operations in two places: once in the HTTP keyword (even though this may be handled by, say, the .NET web API framework) and once in the parameters/flags passed in. This may not be a big deal. But the question is why, when we can pack all the info in just one parameter/place. Also please note that the end-point syntax standardization is not tied to the doctrine of GET/POST/PUT/DELETE and you can simply use the POST keyword while keeping the same end-point syntax.
</p>
<p>The design of the end-point also worth noting. I have saw very typical design that mimic the design of database table. Personally, I have strong doubts about this approach even though I understand the influences from the RESTful doctrine. This approach, in essence, is asking the client application to perform the work of a database. It is true, this approach will guarantee the accessibility of all data. However, from application's point of view, this is never the aim of an application architect. The aim of an architect can be the decoupling, the layered design, shield higher layer from the complexity of the lower layer ... etc. But, not the access to the every single detail of the lower layer. This approach of asking clients to know and handle the database table directly, actually, violates many application design's best practice. For one, you are not decoupling the design and did not isolate the higher layer from the lower detail unless you build all these layers into the client application. Let's forget about the performance for a moment. Just think about what if you decide to change the database table design. Without changing the end-point design, do you still guaranteed the access to all the details? Also, obviously, the black box approach of an object oriented design is violated. The design also force the API consumer to learn all the relations between entities/objects. Also, the performance is going to take a hit. Just imaging if you need to join two tables. All the records will have to be read from the server and check for the matches before presenting the matched info to the user.
</p>
<p>People working in the IT field are constantly overwhelmed by new stuffs and it is my hope that, with this article, people that working in the IT field will actually look at the new stuffs and make logical decisions.
</p>
</div>
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-68536770314358669022019-01-05T21:33:00.000-06:002019-01-05T21:33:02.328-06:00An organizing of asynchronous code in javascript / c# ...<span style="font-family: Arial,Helvetica,sans-serif;">Begin</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">Asynchronous codes in program aren't uncommon. It, however, from time to time, cause confusions in tracking and debugging codes that surrounding them. For example, programmer may forgot that an asynchronous task have been kicked off and that certain operations or functions would not and could not be performed until the task is done. To help with this end, there is this idea of keeping the kick off and call back functions close to each other. An example of this will be the Microsoft C# async and await keyword pair. Javascript mostly using the anonymous function to keep the kick off and the call back function closer.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">An scenario I run into is that a single button click triggers several asynchronous tasks and the logic is required to monitor the result of each asynchronous task in order to react. As we can see, in this case, even though keeping call backs with triggers is good, keeping all call backs close to each other is also beneficial.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">My solution to the situation is to pass in a gathering function to each trigger/call-back pair and has each call-back eventually call the gathering function. In this way, with logic in the gathering function, we can monitor all the result in one central place and helps debugging codes too. If desired, it is also possible to move all call back logic in the gathering function for centralized logic checking and debugging.</span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">End</span><br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-82631278674036352852019-01-03T10:34:00.000-06:002019-01-03T11:10:26.200-06:00Construct Javascript JQuery HTML OOP re-usable controls<span style="font-family: "arial" , "helvetica" , sans-serif;">Begin</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">The goal of this article is to outline few thoughts on creating re-usable Javascript/JQuery and HTML based web controls.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Through my recent NodeJs development, I noticed my needs of creating similar web/HTML control in various part of the project. As seasoned programmers would do, I began to think about re-usability of the code and also the OOP approach.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">As Javascript/HTML programmer will know, the OOP isn't an automatic thing in Javascript/HTML development. After few days of pondering and trying, I was able to come up with a scheme and that is what this article is all about.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">First of all, let me clarify what I mean by <b>a</b> 'control'. When I said a control, what I really mean is a group of basic/HTML control been considered as a basic operation unit that can be deployed or re-used in various parts of projects - in a way, it is actually a 'composite control'. For example, you can consider a set of html textbox element (i.e. <input type="text" />) arranged in a html table element as a spreadsheet control. You may even include few buttons as part of that control. You can then use it in various parts of projects.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In my case, one of the control looks like this:</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKh-GpCGr-oaHMkz93A6UbqbPlf0uDZEa-JG93f3Q3JfpgfPVXDS4G3mCVES9lSG95gRrPC7XTNirU_EG4JhDGa1eJcs4FLoK4HkiIY2Oq4V5qaFB-x_Loc-MYgfUyqKUh3ysDmmuRROc/s1600/MsrsTab.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="525" data-original-width="691" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKh-GpCGr-oaHMkz93A6UbqbPlf0uDZEa-JG93f3Q3JfpgfPVXDS4G3mCVES9lSG95gRrPC7XTNirU_EG4JhDGa1eJcs4FLoK4HkiIY2Oq4V5qaFB-x_Loc-MYgfUyqKUh3ysDmmuRROc/s640/MsrsTab.PNG" width="640" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">As shown in the screenshot, my control consists of quite few html control/elements and they interacted with each other as a unit.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">With Javascript in mind, obviously, we would like to capture event handling and needed data in a Javascript 'class/object'. This can be achieved by using the function and prototype construct of the Javascript language:</span><br />
<pre> cClass = function (Data) {
this.Data = Data;
}
cClass.prototype.Function_1 = function (argument, ...) {
...
}
</pre>
<br />
<br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">The functions would include all the event handling functions and other functions needed for operation of the control. You may also include a function that construct all the html elements.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">A control being a control is that you can use it in various places in your projects. A very important requirement for being able to do that is being able to assigned an ID to each instance of the control. Programming code can, then, use the ID to perform tasks on the correct instance of a control.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">For html controls, they can all have an ID attributes. It is, therefore, possible to assign different IDs for each instance of the control and this can be done through the function that construct the html elements.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">A better approach, however, in my opinion, is to wrap each instance in a div element with instance ID. With this approach, you would have the option of building the html manually by copying html elements into an instance div element instead of relying on a function to build the html elements.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Once controls are in place, program codes need to have ways to access html elements inside an instance. This is where the JQuery come into play. By using the syntax:</span><br />
<pre> $('#InstanceID #ElementID')
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">the program code can access elements inside an instance.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">There are few other details to be observed while making the code work. But, in essence, this basic structure should provide you a re-usable control.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">End</span>Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-3630096820421435682018-09-18T23:11:00.000-05:002019-04-21T23:46:40.924-05:00Higher Education IPEDS College Data UI and RESTful API - defnition, charting, demonstration <br >
<p><b>Updated 04/21/2019:</b>The demonstration of the project can now be found at:<a href="https://www.youtube.com/playlist?list=PLy-Sv12eS2t0wb2zZg3lFg-vvvbe71kKt">here</a>.</p>
<span style="font-family: "arial" , "helvetica" , sans-serif;">* 11/12/2018: Imported newest IPEDS data </span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">as of Oct. 24, 2018 </span>into the system. An article that demonstrated the use of these new data can be found at <a href="https://edpond.blogspot.com/2018/11/ipeds-college-data-distance-class.html" target="_blank">EdPond.blogspot.com</a>.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This article describes my desire, my efforts, and my continuous work on an IPEDS College Data User Interface (UI) and Application Programming Interface API). The application consists of the client, through which user interact to and the server, which implemented via a RESTful API.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">The IPEDS
college data is, arguably, the most important data for United States' colleges.
The data is not only for researcher but also for general public to
learn about colleges. The data appeared in various reports like the US
News College Ranking and the College Scorecard reports.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The IPEDS
college data have been made available for many years, but, like many government
data reside on the Internet, a user friendly application is largely not
exist and this seriously restrict the value of the data since people
can't easily arrange the data into a digestible form. It is these inconveniences that made me wanted to build an </span></span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">infrastructure for,
say, the government data.</span></span></span><br />
<br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">A system was build around the statistical programming language R, which carries a lot of my pioneering ideas. The system, however, can not be easily extended to the modern web based infrastructure - hence, the current new project.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">With the desire to build a new system, I initiated the project with the postsecondary higher education IPEDS college data as the focus. To begin, a</span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> fund raising attempt was launched on the Kickstarter.com. With the lack of support from IPEDS participating institutions, I take the work to myself.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">As
with many long standing data collection, IPEDS college data suffers the same kind of
problems like definition changes, backward compatibility ... etc. And as
known to the IPEDS college data insider, to resolve all issues came with the survey,
it can take tremendous amount of efforts. For this project, we are not
aiming to resolve all problems but aiming to provide easier access to
the data.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> </span><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">At the onset of the project, two user groups are of our major concern:</span><br />
<ol>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"> Students and parents that are looking for colleges.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;"> The researcher</span></li>
</ol>
<span style="font-family: "arial" , "helvetica" , sans-serif;">These
two groups will have different scenario for using the college data and likely
will require different user interface or application. However, one thing
in common, is the need to have all the data in database for easy
retrieving.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />The
first goal of this project is to put the college data through database manipulation. We can
then address the accessibility issue. The process of importing college data
into the database isn't of no pain since, as we all know, not all data are
clean. This process is largely refined, as demonstrated in my <a href="https://www.youtube.com/watch?v=DmF6MqnOcjw" target="_blank">first youtube video</a>.
The process isn't totally automated, but are good enough for most of
the purposes - do prepare to be interrupted when there are problems in
the raw data.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">For students and parents, our goal is to allow viewing and comparing of multiple colleges to allow making informed decisions.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />For
researcher, our goal is to provide tools that can help identifying
definition changes and help retrieving college data across multiple years.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Once
the IPEDS data is processed into the database, it is, then, a matter of
how to retrieve the needed information. The design and decision can
actually make or break the usefulness of the system.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">To
entice average user to use the college data system, the interface should provide low
learning curve. Even though It is always true that the more you know,
the easier you can adapt or make better use of a system. However, with
the busy schedule of today's population, lower learning curve is
essential for majority of the population.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Before
the project started, most of the data accessing logic were tested and
implemented in the programming language R with command line console
interfaces. The goal of this new project is to provide user with a
tested and true graphic user interface for our users.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">As
the project progressed, video were made to demonstrate the usability.
The project won't reach the final stage until the user interface is
finalized.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The first report of the progress can be found at <a href="https://www.youtube.com/watch?v=7OvT8orlVsI" target="_blank">UI+API for IPEDS College Data - Definition, Trend, History, - a progress report</a>.
The IPEDS college data system demonstrated a search/filter front end that do not require
prior knowledge of the IPEDS college data survey. After desired measurement have been
selected, the program user interface provide a summary table for user to click and pick
allowed refinement for the measurements. The user can then retrieve the
college data for viewing as demonstrated in the video, the goal of the video is to
show the capability other than the operation as the operation will be
refined to provide even better user interface for less tech inclined users.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The second report of the progress can be found at <a href="https://www.youtube.com/watch?v=aWzopizHGtM" target="_blank">UI+API for IPEDS College Data - Chart, Trend, Definition - a progress report</a>.
The college data access system, not only shows the added charting capability but also
demonstrates various scenario on how to use the charting capability to
exam the college data retrieved. Again, some of the operation will be refined to
provide even better user experiences. The chart configuration
interface, however, should provide user with a very positive experience in
using the college data system. Comparing to the first video, the first video left
user with a list of records that have to be processed with other software to
get a better sense out of the data. The charting capability of the college data access system removes that
needs. The easy of use of the chart configuration table also made the
project very user friendly.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Please
bear in mind, this is just a seeding project. I have the intention of
including more government data based on the similar data processing
scheme.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />====== vvvvv Scratches vvvvvvv =========</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">This project is about building the basic infrastructure
for general government data with the federal IPEDS college data as the
pilot data source.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />IPEDS (Integrated Postsecondary Education Data
System) survey has been around since 1980's and it collected a lot of
data from United States' colleges - public or private. The data is not
only interested to researchers but also students and parents.<br /><br />IPEDS data is made available and is used/reported in many reports - like US News College Ranking and College ScoreCard Report.<br /><br />Even
though the IPEDS data is made available to general public, like most
government data reside on the Internet, it usually requires certain
level of data processing skills to make good use of it.<br /><br />The
purpose of this project is to reduce the barriers for both the general
public and researchers - Please viewing the project video to see what we
know is working and how we were able to produce some report from our
current system. The goal of this project is to extend the limited data
we have and to provide better user interface for our user.<br /><br />As mentioned in the video, we are targeting two groups of users: The researcher and the general students/parents group.<br /><br />For students and parents, we will provide tools to allow them to comparing colleges.<br /><br />For researchers, we would provide tools to help them dealing with multiple year trend data.<br /><br />This
project is a foundation project and it is for the social good. By
adding more government data to the system, citizen can get educated and
can understand our society better.<br /><br />Supporting this project basically provide you access to the data and help us to continue funding the development.<br /><br />Thank for your support.<br /><br />*
All rewards are early-bird 1 year subscription or less. All survey
published by IPEDS for recent 10 years are available with summary.
Report generated must cite our URL for blame - we make sure our data
matches the ultimate source. Personal research can't be cited/used by
employer. Personal account results can't be published/shared.
Institution account means data at institution level. Sector account
means data at the sector level.<br />Risks and challenges<br /><br />As
mentioned in the project video, for the most part, we have tested our
approach with limited data. Through the testing, it demonstrated our
ability to solve problem we encountered. Not denying, there will be
obstacles, just like we had run into them. Some may be just related to
clean-up of data and some may be more technique. But we are confident we
can get them resolved. Of cause, we will be needing a dedicate web
server to host the data online and to provide data API - one year cost
included. If we can get exceeding support, extra money could be used to
support the operation.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">================ </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">IPEDS
(Integrated Postsecondary Education Data System) data is arguably the
most important data source for learning about United States' colleges.
The data have been made available for years. However, without a user
friendly interface/application, the data, like most raw data, is,
likely, under-used.<br /><br />The goal of this project is to build a
user-friendly interface/application based on my past experiences in
dealing with federal data.<br /><br />The first video is a buy-in pitch that detailed the vision, the prostpects, and the considerations.<br /><br />The
second, and the following videos are to serve as progress report and,
possibly, the tutorial, when the system is made available.<br /><br />Comments welcome ... SsocialDataCenter at(@) gmail.com</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">===============</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">This is a video that is also available at KickStarter project that aims to make IPEDS US college data easier to use and access.<br /><br />As
mentioned in the project, the IPEDS data had been made available for a
long time but a user friendly application haven't been readily
available. The project is building on a general database scheme that can
be extended to other datasets.<br /><br />For IPEDS, it is intended to
provide user an easily accessible online database and a user friendly
interface that can retrieve data and general charts.<br /><br />User support
for the project is needed not to just build the system but support the
operation cost of keeping the online database on internet servers.
Updating the database also cost money so are making improvement to the
application. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">===============</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">This
video demonstrates an IPEDS access UI. The project is under
construction. The project take a very general approach. That means it
can easily adopted to other datasets. The project present the data as it
is and does not try to make decisions for researchers as how a variable
should be interpreted and if it has changed definition through out
years. We leave these decisions to data professionals. Aware of this,
however, : Not all information are available via IPEDS data files. When
in doubt, IPEDS document should be consulted.<br /><br />Questions and Comments welcome ... SsocialDataCenter at(@) gmail.com</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">===============</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">This
video presents a progressive enhancement to a IPEDS access UI project,
which takes general approach in data organization and, therefore, can
adopt to other datasets easily.<br /><br />Many of the stated objectives:<br /> The project present the data as it is and does not try<br /> to make decisions for researchers as how a variable <br /> should be interpreted and if it has changed definition <br /> through out the years. We leave these decisions to data <br /> professionals.<br />will be demonstrated through the course of this new video.<br /><br />Beside
using the newly designed charting/ploting capability to demonstrate the
project's objectives, the video, itself, features an innovative chart
configuration tool through which many usage scenario are possible.<br /><br />With
the chart configuration tool, usage scenario were demonstrated that
show user ways in detecting anomalies, checking defintions, and locating
source of causes.<br /><br />Aware of this, however, : Not all information
are available via IPEDS data files. When in doubt, IPEDS document
should be consulted.<br /><br />If you have any question or comment, please feel free to contact me at: socialdatacenter at(@) gmail.com</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">========</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com2tag:blogger.com,1999:blog-8574013375253744423.post-44796315850735488392018-08-22T11:59:00.000-05:002018-08-22T12:08:31.313-05:00REST or Representational state transfer<span style="font-family: "arial" , "helvetica" , sans-serif;">After worked on my project using REST frameworks, I realized my implementation of my project could be awkward if I relied heavily on HTTP GET method even though the stateless approach made good sense in the project.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Because of this awkwardness, I begin to look up problems with REST. One of the article I run into is '<a href="https://mmikowski.github.io/the_lie/" target="_blank">RESTful APIs, the big lie</a>'. Few things described in the article resonate with my development experience. After reading comments on the article, it is clear that there are quite few perception/understanding issues about the REST.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">To get a bit of clarification I decided to see what Wikipedia have to say about the REST - sorry, I got practical projects to work on and have no intention of spending my time on theoretical debates.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Here's what I get out of the <a href="https://en.wikipedia.org/wiki/Representational_state_transfer" target="_blank">Wikipedia</a>:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> The REST is largely what the Web is today (follow the constrains section) -</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Client-Server </span><span style="font-family: "arial" , "helvetica" , sans-serif;"> - this is obvious.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Statelessness</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - Except applications that using server side session storage.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - Cookie is OK since it is client side</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Cacheability</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - Applications may not always specifically set it. But it is there.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Layered system</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - HTTP fulfill it.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Code on demand (optional)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - basically, the javascript or others in the early days.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Uniform interface</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Resource identification in requests</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - This call for identifying of resources which the URL basically fulfill it.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Resource manipulation through representations</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - A working application not rely on server session will meet this constrains</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Self-descriptive messages</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - Wiki quote the example of media type - well, the implications are many </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - media type is just a code - that means all other info/code can be hard-coded.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - I guess, we can stretch to say some message standard are to be specified.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Hypermedia as the engine of application state</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - This is like to say a home/root page is desired</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> - It serve as the root to discover all other resources.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Applied to Web services</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> As should be clear by now, the REST does not call for HTTP.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Most of today's so called RESTFul API/web-service are based on HTTP, but they don't have to. Also, based on HTTP does not make it RESTFul. Since HTTP is not called for, the use of GET/POST/PUT/DELETE should not be a criteria either - even if it is what most of people trying to do - now it make me wonder what role HTTP played in </span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://en.wikipedia.org/wiki/Roy_Fielding" title="Roy Fielding">Roy Fielding's</a> dissertation.</span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">For me, I think I am happy with what I have after reading all these. From my assessment of my own project, I would say that what mine don't have at this point is the following:</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> A home page that can reveal/lead to all resources.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> Message standard to be specified/published.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Other than that I think I am fine. Besides, I don't really want to reveal my message standard or provide a home page if I am not interested in making the API public. I may only reveal these to my business partners.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span>
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-37108020890976032072018-07-07T00:27:00.005-05:002018-07-07T00:37:05.999-05:00Why do I Disable Windows Defender on Windows 8.1<span style="font-family: "arial" , "helvetica" , sans-serif;">Begin </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This morning I noticed that my computer is running quite slow. A quick look at the Task Manager I notice the Windows Defender is taking a big share of the resources. I was concerned but do not want to spend time to deal with it and hoping that after some disk scan it will quiet down. Just a quick a note: the CPU was about 25% consumed while the disk is quite high - at times it stay at 100%.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">At the evening of the day, I noticed that not much have changed. This really bothered me. Not much of the CPU but the long consumption of the disk for more than 10 hours?</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">I began Google for ways to stop/disable/uninstall the service. I then learned that you can't really uninstalled the thing - it has been mentioned that it is an integrated part of Windows 8.1 and people take over registry and folders to get rid of it actually find themselves a dead PC. When I did locate few articles about disable the thing, I found that my version of the software do not provide options mentioned in those articles - I suspect that my version of the software must have gone through several upgrades and some of those options must have been removed.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">At that point, I was totally frustrated and thinking that '</span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span class="st">absolute <i>power corrupts</i> absolutely</span>' - it is not that Microsoft did not mean well. However, when you believe you knows better and do not give user options, there will be times that you miscalculated.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In this case, however, I was fortunately enough to locate the article '<a href="https://www.isunshare.com/windows-8/3-ways-to-disable-windows-defender-on-windows-8-8.1.html" target="_blank">3 Ways to Disable Windows Defender on Windows 8/8.1</a>'. The Group Policy method did work and I was able to disable the software.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">* A side note. I was trying to work on folder and file permissions in order to stop the software. But failed. The thought? Well, I think it is very interesting in the sense of social behavior. The 'administrator' used to be considered the GOD and is, presumably, given all the power to do things. These days, administrator is no longer trusted and did not, in plain obvious way, given all the power to perform all the things. The administrator these days were guarded against by Microsoft via other layers of security complexity. The registry and the group policy are now the higher layer of security complexity. Without master/tinker with these layer of complexity, administrator's rights are limited.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">One big problem with these additional layer of security complexity is that these complexity is not to understand logically - it is a guess and try memorization. It is also subject to change whenever the software </span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">update</span>. These settings are totally in the hands of the software. How the software using the registry and group policy value determines if the administrator will have the rights or not. The right of administrator is no longer a given and this added load to administrators' shoulders.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">* Question: For the human race, is this approach a step forward?</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">End</span><br />
<br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-50871358536991501932018-04-05T22:52:00.001-05:002018-04-05T23:38:55.133-05:00a Drupal wiki bug solved - flexifilter<span style="font-family: "arial" , "helvetica" , sans-serif;">Begin</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">As is known, I began to work on my <a href="https://www.kickstarter.com/projects/1574802213/always-organizer-always-have-needed-info-with-you" target="_blank">Always Organizer project</a> located at KickStarter.com.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">I began to look into wiki works that have been done for the Drupal platform. Found few good articles that I was not aware of in the past when I was busy working for a not worthing agency - Nebraska Postsecondary.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Anyway. All the thing I learned are going into my wiki - my way of keeping things organized and it is the purpose of my Always Organizer project.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Today, the thing that really made me happy is that I have contributed to the Drupal project - I provided a patch to a Flexifilter issue that have not been resolved for 6 years. See <a href="https://www.drupal.org/project/flexifilter/issues/1436704" target="_blank">here</a> for detail.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The Flexifilter is one very important component for doing wiki in Drupal. I am glad to contribute and moving my project forward.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">End</span><br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-14036295366412489392018-03-28T13:47:00.002-05:002018-03-29T03:32:10.936-05:00A step toward organizing information in the digital age<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">As the world moved toward everything digital, <span style="font-family: "arial" , "helvetica" , sans-serif;">people had envision paperless for quite a while now.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">To a large degree, for structured data, the world ha<span style="font-family: "arial" , "helvetica" , sans-serif;">d made great stride. <span style="font-family: "arial" , "helvetica" , sans-serif;">D</span>atabases and applications <span style="font-family: "arial" , "helvetica" , sans-serif;">were</span> <span style="font-family: "arial" , "helvetica" , sans-serif;">created successfully to host those data<span style="font-family: "arial" , "helvetica" , sans-serif;"> and people everywhere <span style="font-family: "arial" , "helvetica" , sans-serif;">are adopting those systems well.</span></span></span></span></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">The observation<span style="font-family: "arial" , "helvetica" , sans-serif;">, however, is that for non-structured data, the adoption is some<span style="font-family: "arial" , "helvetica" , sans-serif;">what of a slow pro<span style="font-family: "arial" , "helvetica" , sans-serif;">cess<span style="font-family: "arial" , "helvetica" , sans-serif;">es in the making </span></span><span style="font-family: "arial" , "helvetica" , sans-serif;">especially in the realm of organizing<span style="font-family: "arial" , "helvetica" , sans-serif;"> and us<span style="font-family: "arial" , "helvetica" , sans-serif;">ing</span></span> them.</span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">For example, meeting notes, book notes, and class notes are a kind of un-structured data.</span></span></span></span><br />
<br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">For the note taking industry, <span style="font-family: "arial" , "helvetica" , sans-serif;">the<span style="font-family: "arial" , "helvetica" , sans-serif;">re</span></span> is no shortage of note taki<span style="font-family: "arial" , "helvetica" , sans-serif;">ng <span style="font-family: "arial" , "helvetica" , sans-serif;">gadgets in the market, but most<span style="font-family: "arial" , "helvetica" , sans-serif;"> are just traditional </span><span style="font-family: "arial" , "helvetica" , sans-serif;">note taking with gadgets.</span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">In terms of org<span style="font-family: "arial" , "helvetica" , sans-serif;">anizing and using <span style="font-family: "arial" , "helvetica" , sans-serif;">un-structured data, I would show two articles of interests:</span></span></span></span></span></span></span></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> <a href="http://sourcesofinsight.com/10-ways-to-improve-how-you-manage-information/" target="_blank">10 Ways to Improve How You Manage Information</a> </span></span></span></span></span></span></span></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> <span style="font-family: "arial" , "helvetica" , sans-serif;">Which <span style="font-family: "arial" , "helvetica" , sans-serif;">talked about how '</span></span>Information Management is a Hallmark of Better Productivity'</span></span></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> <a href="https://www.data.cam.ac.uk/data-management-guide/electronic-lab-notebooks" target="_blank">Electronic Lab Notebooks</a><span style="font-family: "arial" , "helvetica" , sans-serif;"> </span></span></span></span></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> where University of Cambridge is trying to help researc<span style="font-family: "arial" , "helvetica" , sans-serif;">her to</span></span> save/store their notes</span></span></span></span></span><br />
<br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">At the<span style="font-family: "arial" , "helvetica" , sans-serif;"> University <span style="font-family: "arial" , "helvetica" , sans-serif;">of Cambridge, they fail<span style="font-family: "arial" , "helvetica" , sans-serif;">ed to recommend a single software for the Uni<span style="font-family: "arial" , "helvetica" , sans-serif;">versity to adopt.</span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The meat of my suggestion is the use of a wiki-style system to org<span style="font-family: "arial" , "helvetica" , sans-serif;">anize<span style="font-family: "arial" , "helvetica" , sans-serif;"> notes or similarly un-structured data. Personally, I have used that systems for <span style="font-family: "arial" , "helvetica" , sans-serif;">ages and<span style="font-family: "arial" , "helvetica" , sans-serif;">, although<span style="font-family: "arial" , "helvetica" , sans-serif;"> not perfect</span></span></span>, I fou<span style="font-family: "arial" , "helvetica" , sans-serif;">nd it is very useful.</span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Before I presented my wik<span style="font-family: "arial" , "helvetica" , sans-serif;">i-style note system, let's step back <span style="font-family: "arial" , "helvetica" , sans-serif;">and look at how people have been taking notes an<span style="font-family: "arial" , "helvetica" , sans-serif;">d how people have been organizing them.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">In the cases of book notes or study <span style="font-family: "arial" , "helvetica" , sans-serif;">notes, people/st<span style="font-family: "arial" , "helvetica" , sans-serif;">udents</span> wrote <span style="font-family: "arial" , "helvetica" , sans-serif;">notes</span> on papers with <a href="https://www.wikihow.com/Organize-Notes" target="_blank">some kind<span style="font-family: "arial" , "helvetica" , sans-serif;"> of structure<span style="font-family: "arial" , "helvetica" , sans-serif;"> if they do choose</span></span></a></span>. Once notes were taken, to organizing them, people can easily put related notes together in folders and filed into cabinet if they want by category<span style="font-family: "arial" , "helvetica" , sans-serif;"> or alphabetically.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">In the cases of meeting notes or notes with simila<span style="font-family: "arial" , "helvetica" , sans-serif;">r natures, <span style="font-family: "arial" , "helvetica" , sans-serif;">notes could be taken in similar fashion like the <span style="font-family: "arial" , "helvetica" , sans-serif;">book no<span style="font-family: "arial" , "helvetica" , sans-serif;">te or stu<span style="font-family: "arial" , "helvetica" , sans-serif;">dy note, but the fi<span style="font-family: "arial" , "helvetica" , sans-serif;">l<span style="font-family: "arial" , "helvetica" , sans-serif;">ing and org<span style="font-family: "arial" , "helvetica" , sans-serif;">a</span>ni<span style="font-family: "arial" , "helvetica" , sans-serif;">z</span>ing can ce<span style="font-family: "arial" , "helvetica" , sans-serif;">rtainly make difference<span style="font-family: "arial" , "helvetica" , sans-serif;">s. For exa<span style="font-family: "arial" , "helvetica" , sans-serif;">mple, a meeting may cover various topics/projects.<span style="font-family: "arial" , "helvetica" , sans-serif;"> In th<span style="font-family: "arial" , "helvetica" , sans-serif;">e</span>se cases,<span style="font-family: "arial" , "helvetica" , sans-serif;"> note taker may like to tear up the note so that he<span style="font-family: "arial" , "helvetica" , sans-serif;"> or </span>sh<span style="font-family: "arial" , "helvetica" , sans-serif;">e can file notes under the appropriate topic or project. However, if that is the ca<span style="font-family: "arial" , "helvetica" , sans-serif;">se, this will tear-up</span> the note of the meeting and it would be difficult to know <span style="font-family: "arial" , "helvetica" , sans-serif;">the over all picture of the meeting.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The multi-topic nature of the meeting note isn't as unique as it may sound. For example, to file an article away, reader may noti<span style="font-family: "arial" , "helvetica" , sans-serif;">ces th<span style="font-family: "arial" , "helvetica" , sans-serif;">at arti<span style="font-family: "arial" , "helvetica" , sans-serif;">cle covers two topics, like education and workforce. Filing the article under either the education folder or the workforce folder <span style="font-family: "arial" , "helvetica" , sans-serif;">the </span></span></span></span>reader risks th<span style="font-family: "arial" , "helvetica" , sans-serif;">e chance of fi<span style="font-family: "arial" , "helvetica" , sans-serif;">nding th<span style="font-family: "arial" , "helvetica" , sans-serif;">at art<span style="font-family: "arial" , "helvetica" , sans-serif;">icle the next time w<span style="font-family: "arial" , "helvetica" , sans-serif;">he<span style="font-family: "arial" , "helvetica" , sans-serif;">n he looking for it s<span style="font-family: "arial" , "helvetica" , sans-serif;">ince he maybe looking <span style="font-family: "arial" , "helvetica" , sans-serif;">in</span> the wrong folder.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">After reviewing few cases o<span style="font-family: "arial" , "helvetica" , sans-serif;">f how people dealing with <span style="font-family: "arial" , "helvetica" , sans-serif;">paper notes</span></span>, let's ta<span style="font-family: "arial" , "helvetica" , sans-serif;">ke a look at what a wiki sy<span style="font-family: "arial" , "helvetica" , sans-serif;">stem can do for us.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">First of all, wiki is basically just a quick way to create linked web pages (read <a href="https://en.wikipedia.org/wiki/Wiki" target="_blank">Wikipedia</a> if you need to), where web pages are just like a Word document that you can type, you can highlight, and you can format, ...etc. The thing about wiki web pages, however, is that the linking is a second nature of wiki pages and creating a document is as easy as creating<br />a link.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">When applying the wiki principle to the meeting note scenario, we could create, in each project page, a link to the meeting note page. In this way, all project page will aware of decisions made in that meeting while you have your meeting page intact. The other approach would be to cut and paste the meeting decision to each project page while create in the meeting page links that linked to each project page. In either case, you can always find those decisions no matter you follow the meeting page or the project page.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In the case of filing article away, you can easily create, in both the education page and the workforce page, links to the article page. In this way, you can always reach the article page no matter which way/page you choose.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">When working on book notes or study notes, link can easily be created to a prerequisite knowledge page and can help the learning tremendously.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Filing or organizing information in wiki is great. But how about the presentation in terms of the <a href="http://theelearningcoach.com/elearning_design/we-design-information-too/" target="_blank">5 hats LATCH</a> approach? In general, user can arrange pages in all five arrangements (Location, Alphabetically, Timeline, Category, and Hierarchically) manually at the same time since all we have are web pages and presentations would just be links to the pages. However, using selected approach for appropriate pages can make the presentation more logical.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Depend on implementation, some wiki system also handle pictures and files.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<b><span style="font-family: "arial" , "helvetica" , sans-serif;">A retrospect:</span></b><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Back to the time of folders and short file names, I would build folder hierarchy and try to store/organize files/information in a hierarchy way. With the short file name, I constantly have to create a text file: _ReadMe.txt to define and describe the content of the folder. With the introduction of Windows' 95, the _ReadMe.txt file can actually be a web page that provides links and description of the folder. With the shortcut of the file system, the folder web pages provide a fair information organization system. At the time, I did not try to see if it is possible to link folder pages. But, as you can see, the idea is very close to what I have today with the wiki web pages - Using web page with links to document/organize your information.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><b>A project at Kickstarter.com</b>: </span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://www.kickstarter.com/projects/1574802213/always-organizer-always-have-needed-info-with-you" target="_blank">Always-Organizer</a></span></span><br />
<br /><br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-43562352019204436162018-02-17T20:27:00.000-06:002018-02-17T20:27:34.245-06:00First try on vala<br />
<span style="font-family: Arial,Helvetica,sans-serif;">It has been for quite few years that I know about Vala. I don't remember exactly how or why I run into it. I believe I spent a bit of time reading about it and was thinking this is exactly the language I would like to use for <b>all</b> my personal project.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">I am not sure that thought will change or not. But here are few things I like about Vala the first time I learn about it:</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"> It is open source.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"> It is cross-platform ( Windows and Linux). </span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"> It supports class in a way similar to C# and Java instead of C++</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"> - even though I like C++'s native look.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"> It can do GUI in the way of classes - through GUI packages.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">For this article, I will just describe the steps I took to finally test the first vala program. I try to follow the instructions I could find. But, somehow, I do run into few problems that bothered me a bit. I did get them resolved but I am not totally confident that is what suppose to happen or if I missed something obvious.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">I Started with <a href="https://wiki.gnome.org/Projects/Vala/ValaOnWindows">Vala installation instruction for </a></span><span style="font-family: Arial,Helvetica,sans-serif;"><a href="https://wiki.gnome.org/Projects/Vala/ValaOnWindows"><span style="font-family: Arial,Helvetica,sans-serif;">Windows</span></a>. But that call for installing the MSYS2 system first. The instruction for installing MSYS2 can be found <a href="https://github.com/msys2/msys2/wiki/MSYS2-installation">here</a>. The instruction call for running the command line command: </span><span style="font-family: Arial,Helvetica,sans-serif;"><strong><code>'pacman -Syuu</code></strong>'. Few articles pointed out that the pacman was a package manage command used by Arch Linux and this lead me to read the man page at <a href="https://www.archlinux.org/pacman/pacman.8.html#_sync_options_a_id_so_a">here</a>. Unfortunately, reading that does not give me the confidence that the -Syuu is the correct option to use and this lead me to suspect that I probably should be looking for reference information about the pacman command on MSYS2 related websites. At this point, I haven't found appropriate references but I do know that -Syuu seems to lead me to finish test the first Vala program. After finishing with MSYS2, I headed bake to the Vala installation instruction for windows page and installed the following Vala packages in MSYS2: </span><br />
<br /><pre>pacman -S mingw-w64-x86_64-gcc
<span class="anchor" id="line-2"></span>pacman -S mingw-w64-x86_64-pkg-config
<span class="anchor" id="line-3"></span>pacman -S mingw-w64-x86_64-vala</pre>
<pre>
</pre>
<span style="font-family: Arial,Helvetica,sans-serif;">I then headed to <a href="https://wiki.gnome.org/Projects/Vala/ValaPlatforms">this page</a> to test the first Vala program.</span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">After creating the program file, I issued the Valac command to compile the program and the shell returned that Valac is not recognized as a command. This give the hint that this maybe caused by the path variable in MSYS2 shell environment. Checking the syntax for setting path in Linux, I entered the following command:</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"> $ export PATH=$PATH:PathToMSys2/mingw64/bin/</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">and that solved the problem and a .exe file was generated.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">To test the .exe file, I started a DOS window and typed in</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">>my_first_program</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">which failed with a message of missing .dll file.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">After modify the DOS path with this command:</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">path=PathToMSys2\mingw64\bin;%path</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">I was able to run the .exe file successfully.</span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">* Since I uses the zipped file instead of the installer file to install the MSYS2, It seems reasonable that the path info would not presented in MSYS2 or DOS even though I do need to run the package management program, which could detect the path and setting the path info for both MSYS2 and DOS environment.</span><br />
<br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">End</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-3213848135490153642017-10-30T16:03:00.000-05:002017-10-30T19:34:37.116-05:00Sweet and short R set-diff code<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Was working on a project in R and was using extensively with the 'names' property of a vector. Basically, I use the vector to form the menu for user to pick off the desired choice. To provide user enough information, lines and lines information is embedded in the names property.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">All of these was working well until I let user to pick items to be removed from the list/vector repeatedly.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">As is a reasonable approach, all the program need to do is to use R's set operation: setdiff() to remove picked items from the original vector/list. Unfortunately, the setdiff() function removes all names from the list.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Here's my solution: v1 <- v1[!is.element(v1,Picked_items)];</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In this way, all names are retained.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Don't you just love R - no loop is needed.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-58390357664808984932017-05-17T23:28:00.000-05:002017-10-16T13:24:57.670-05:00Unix sed, Python CsvKit under Windows Scripting Host (WSH); Problems and solutions <span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This is a just a short article that described problem and finding I encountered in one of my project and were wishing that what I found can be useful to someone following a similar path as me - A short side track: Nerds or people like me working and sharing knowledge, a lot of times, were overlooked as been anti-social and less of charity or volunteering to the society. I for one, would like to pass and dispatch the messages that we, the nerd and <span style="font-family: "arial" , "helvetica" , sans-serif;">genuine</span> hard worker, are to be proud of our contribution to the society and world for making the world a better place.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Back to the topic.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">I were involved in a Windows automation project and were writing most of my code in VBA. However, with my knowledge about the Unix way of doing things, it makes totally sense for me wanting to run some tasks through some Unix utilities program. As we all know, Unix way basically means command lines. Fortunately, Windows did not fore go the access to command lines. For VBA, there are the general Shell() command. But that is not the only option for VBA. With Microsoft COM infrastructure, VBA programmer has access to wide <span style="font-family: "arial" , "helvetica" , sans-serif;">variety</span> of objects. One of them is the Windows Scripting Host. By accessing to Windows Scripting Host, programmer can have better control of the DOS-shell/command-line environment.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">While I was happily using the Windows Scripting Host to carry out my command line tasks, I notice that for most Windows/DOS based programs they all run great until I try to run some Unix utilities that were ported over to the Windows/DOS world.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Before I go on, I would like to point out that I did not spend a lot of time trying to figure out every single issues, so please bear with me for not be able to provide all possible solutions and <span style="font-family: "arial" , "helvetica" , sans-serif;">explanations</span>. </span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">One Unix utility I used is the sed command from the MinGW/msys. I was able to verify its functionality by running some test directly under the Windows/DOS command line after removing some conflicting search paths from the PATH environment variables - for example, in my system, I also have Qt and GNAT installed.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">After verifying the sed under that Windows/DOS command line, I invoked it through the Windows Scripting Host via VBA. The command failed with a return code of 2, which, for sed, could just mean errors during execution or , for DOS, could mean file not found. By testing with non-existing command, we know the Windows Scripting Host do recognize the sed command. By testing with simple 'sed -help 2>file', I realize it may have something to do with the shall's interpretation/parsing of command line. This lead me to the thought of using the Cmd.exe /C to run the sed. By running 'Cmd.exe /C sed ... ' under the Windows Scripting Host, everything worked out. The other command I run into the same problem is the Python CsvKit commands. Again, running with Cmd.exe solve the problem. At this point, I can't say I understand the problem. My hint is that it may have something to do with the redirection of the standard output since all my Unix and Python commands used the redirection. </span><br />
<br />
<br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-15241001729530334222017-03-20T05:56:00.000-05:002017-12-11T12:35:10.304-06:00A better replication function:rep() for R<span style="font-family: "arial" , "helvetica" , sans-serif;">This article is to propose a new approach to the R replication function rep(). At this point, I am not fluent in creating R packages and would not, for a while, create the package even though I will try to provide the code I have in mind.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">First of all, let's review the current implementation of the R replication function rep() in my own words:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> rep(Vctr,times=Vctr1,each=n,length.out=N)</span><br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Each element in Vctr is repeat n times if Vctr1 do not exist. Otherwise, the times each</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> element is repeated is specified by Vctr1. However, if times is a number, the Vctr is</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> repeated that number of times. length.out disregard times, each element is repeated n</span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> </span>times and repeated again until length.out is reached. </span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">From my description above, I see that when 'times' is a vector, its elements controls how the corresponding element in Vctr are repeated. But not when 'times' is degraded to a number - it then control the nu<span style="font-family: "arial" , "helvetica" , sans-serif;">mber of times <span style="font-family: "arial" , "helvetica" , sans-serif;">the 'Vctr' is repeated</span></span>. On the other hand, the 'each', as a number, it also controls the number of times each element in Vctr are repeated. With these info, it just logical for me to want to reconsider the situation when 'times' is just a number. It just seems more logical to me to consider this as a special case where all elements in Vctr are to be repeated the same amount of 'times'. i.e.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"> Vctr1= 5 := c(5, 5, 5, ...).</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">With this equivalency, I also like to propose the switch the meaning<span style="font-family: "arial" , "helvetica" , sans-serif;"> of </span> 'times' and 'each' so that the 'each' now describes how many times <b>each</b> of the elements in Vctr should be repeated. With the meaning of the new 'each' been settled, we should <span style="font-family: "arial" , "helvetica" , sans-serif;">now reconsider the meaning of the new 'times'</span>.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">The newly proposed meaning for 'times' will be the <b>times</b> to repeat the sequence generated by the 'each'. The new meaning for length.out would be designated as the maximum length of the eventual output.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">With the proposed changes outlined above, here are few examples to demonstrate the new new-rep() function.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">>new-rep(1:5,each=2,times=1,length.out=13)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">[1] 1 1 2 2 3 3 4 4 5 5</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">>new-rep(1:5,each=2,times=2,length.out=13)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">[1] 1 1 2 2 3 3 4 4 5 5 1 1 2</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">>new-rep(1:5,each=c(1,2,3,2,1),times=1,length.out=13)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">[1] 1 2 2 3 3 3 4 4 5 </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">>new-rep(1:5,each=c(1,2,3,2,1),times=2,length.out=13)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">[1] 1 2 2 3 3 3 4 4 5 1 2 2 3</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Can we create all that can be done with the old rep() function? - yes!</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Can we create something that is not possible to create with the old rep() function? - yes</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Possible algorithm:</span><br />
<pre>new-rep <- function (Vctr,each,times,length.out) {
if length(each)==1 { # if each exist and just a number
each <- rep(each,times=length(Vctr)) # expand each
}
Rslt <- rep(Vctr, times=each);
Rslt <- rep(Rslt, times=times);
Lngth <- length(Rslt);
if (is.numeric(length.out)) {
if (length.out&tl;Lngth) Lngth <- length.out;
}
Rslt[1:Lngth];
}
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Appreciate your thoughts and possible creation of package.</span>
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-55714321655154005982016-03-30T20:49:00.000-05:002016-03-30T20:58:05.330-05:00Labels for ACS Pums csv download - Data Ferrett to the rescure<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">US Census Bureau conducts the American Community Survey (ACS) annually. One of the data product that made available to the public is the Public Use Microdata Sample (PUMS) data, that can be used by researchers to derive statistical results.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The PUMS data were made available in two formats: SAS and CSV file format. The SAS file format is a proprietary file format and contains long text that give meaning to shortened mnemonic for variables and categorical values. The CSV file format, on the other hand, is supported by almost all software but does not contain helping texts. US Census Bureau does provide document in pdf or text format that describes the mnemonics used. However, the pdf and the text format isn't the easiest to use for statistical software.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Personally, I believe the XML format is ideal to store the description info for mnemonics and I have suggested this approach to ACS help group. In the mean time, I discovered that the Data Ferrett application provided by the Census Bureau can serve as an alternative source for the XML file. By selecting all variables using the Data Ferrett and save the session to a local file, you obtained an XML file that contains the descriptions and the mnemonics.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">By using XSLT, people can easily construct statements that, when run by statistical software, will assign descriptions to mnemonics.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">* A side note, at this <span style="font-family: "arial" , "helvetica" , sans-serif;">point, the XML file generated by the Data Ferrett is<span style="font-family: "arial" , "helvetica" , sans-serif;">n't perfect. The & sing isn't <span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">correctly</span> coded accounting to XML standard and some XSLT software may complain about the file. This<span style="font-family: "arial" , "helvetica" , sans-serif;">, however, can easily corrected by search and replace the & sign.</span></span></span></span></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"> </span>Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-80644307954862116002015-09-29T18:13:00.000-05:002015-09-29T20:20:03.393-05:00UI Design for Viewing Data - Relate Table to ChartUser Interface Design is always an innovation art. It connects human behavior with icy cold machine code.<br />
<br />
In the world of data analysis, charts and tables are gateways to human.
Charts communicate size and quantities to human via human's natural
perception of the world. However, when multiple facets of data are
presented, relating size and quantities to facets becoming a burden to
human. Tables, on the other hand, relate multiple faceted data in
concise form to human sacrificing the advantage of human's natural
perceptions for size and quantities.<br />
<br />
The proposed user interface design is based on the above observations
about tables and charts. The interface begin by presenting a data
table to user with the associate charts: (Two flavor of charts are
presented - vertical and horizontal bar)<br />
<br />
<table border="1" style="border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: small; text-align: right;">
<tbody>
<tr><td><b>Inst.</b></td><td><b>Men</b></td><td><b>Women</b></td><td><b>Total</b></td></tr>
<tr><td><b>Univ</b></td><td><b>14,059</b></td><td><b>15,407</b></td><td><b>29,466</b></td></tr>
<tr><td>NCTA</td><td>97</td><td>102</td><td>199</td></tr>
<tr><td>UNK</td><td>1,876</td><td>2,406</td><td>4,282</td></tr>
<tr><td>UNL</td><td>8,059</td><td>7,588</td><td>15,647</td></tr>
<tr><td>UNMC</td><td>758</td><td>1,387</td><td>2,145</td></tr>
<tr><td>UNO</td><td>3,269</td><td>3,924</td><td>7,193</td></tr>
<tr><td><b>Stat Col.</b></td><td><b>2,020</b></td><td><b>2,727</b></td><td><b>4,747</b></td></tr>
<tr><td>CSC</td><td>660</td><td>941</td><td>1,601</td></tr>
<tr><td>PSC</td><td>350</td><td>446</td><td>796</td></tr>
<tr><td>WSC</td><td>1,010</td><td>1,340</td><td>2,350</td></tr>
<tr><td><b>Comm. Col.</b></td><td><b>6,619</b></td><td><b>7,095</b></td><td><b>13,714</b></td></tr>
<tr><td>CCC</td><td>822</td><td>1,171</td><td>1,993</td></tr>
<tr style="font-weight: blod;"><td>MCC</td><td>1,594</td><td>1,945</td><td>3,539</td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTkRv6FIfiZyOU9EhXdJGCl6xQ7ib9EvfbdUEYiBGdxtVY9lQeIb3mzDJcqEq3DQfY-zdtncEyoXAOqkNH6v_L9lM_QVScO3n81ilUnPxqhdEs1NuH7RQecnmJV_w8xr1lq7XTRUCFfFI/s1600/All_Vrtl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTkRv6FIfiZyOU9EhXdJGCl6xQ7ib9EvfbdUEYiBGdxtVY9lQeIb3mzDJcqEq3DQfY-zdtncEyoXAOqkNH6v_L9lM_QVScO3n81ilUnPxqhdEs1NuH7RQecnmJV_w8xr1lq7XTRUCFfFI/s400/All_Vrtl.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJqXsDwIZbjDO5c9-UbLKMTDzorYyUwMsPTgZspoGRpC54LYAx18fc4_0FVHNXrBK1hq7vzz4FGkEAp8uUuHtHP7tanixJEzozkzjnej171HFgI337Tq7SUsfpmu1yM-UufoEApIqZDd0/s1600/All_Hrzntl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJqXsDwIZbjDO5c9-UbLKMTDzorYyUwMsPTgZspoGRpC54LYAx18fc4_0FVHNXrBK1hq7vzz4FGkEAp8uUuHtHP7tanixJEzozkzjnej171HFgI337Tq7SUsfpmu1yM-UufoEApIqZDd0/s400/All_Hrzntl.png" width="400" /> </a></div>
<br />
It is obvious that these charts are difficult to comprehend
with the mixed facets of institutional and sectional totals. The idea behind
the design, however, is to provide user with channel tools that can channel desired
data to the the chart. Various ways can be
used to select the desired data. For example, using drop-down list,
checkboxes in context menu, or text/regular-expression based filtering to channel the desired data.
Visual feedback can be provided to user by hiding or highlighting
the data table. Possible filtering results are presented below:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio80snjKQw7CIGAKxahfUYTKa7AXMNXc3lsIe2mZjjmmdQvYxgFe4g0-vjqSGpJFGk0LCzn9nc-4LOQ4kYeL3vs4tac1C9wV0ckppnBkqdp4_bGsxg2DPbgySGI1kb6fYe0CmImYqf0oc/s1600/Prt_Vrtl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio80snjKQw7CIGAKxahfUYTKa7AXMNXc3lsIe2mZjjmmdQvYxgFe4g0-vjqSGpJFGk0LCzn9nc-4LOQ4kYeL3vs4tac1C9wV0ckppnBkqdp4_bGsxg2DPbgySGI1kb6fYe0CmImYqf0oc/s400/Prt_Vrtl.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXekN8W1pQv5c-9PpWd4o74i5XSWz9h_ttlbwIJVkXPN-o1nTd4YwNS-6en5l9ZPFVHes_TL4iyW57xnFGarw4VkwA7qWS7DtPLAJlkDXUejyZM4Xeps9tbsv5_yrqTbajN2LUu96IZ9A/s1600/Prt_Hrzntl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXekN8W1pQv5c-9PpWd4o74i5XSWz9h_ttlbwIJVkXPN-o1nTd4YwNS-6en5l9ZPFVHes_TL4iyW57xnFGarw4VkwA7qWS7DtPLAJlkDXUejyZM4Xeps9tbsv5_yrqTbajN2LUu96IZ9A/s400/Prt_Hrzntl.png" width="400" /></a></div>
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-70438279533943006822015-07-27T05:22:00.000-05:002017-12-11T12:39:02.442-06:00Microsoft OUTLOOK Recurring Event ACCESS VBA code<br />
Microsoft Outlook provides a nice calendar program that allows people to track events. The Outlook, like all other components in the Microsoft Office suite, also provides program interfaces (API) for programmer to extend their use of the program.<br />
<br />
In our office, we try to pull these info into our databases. For normal events, the code is straightforward since it is stored in a day by day basis. For recurring events, however, in practical, it can't be stored in a day by day basis since some recurring events don't have an end day. This, therefore, presents a challenge when try to pull in calendar events on a day by day basis. Basically, the program need to go through each recurring event and, based on the pattern of each recurring event, generates the day and time of each occurrences and find out if any of the occurrences fall inside the specific time period of interest.<br />
<br />
Below are codes that I devised and I hope it is of value to someone - please provide adequate credit statement if you do adopt and find the code useful.<br />
<br />
Few words about the program:<br />
<ul>
<li>xCDO is an object that provides access to database.</li>
<li>PrmtrTyp, Prmtr are just for me to extend code in the future. 1 and "" are normally used.</li>
<li>BgnDt, and EndDt specify the period of interest.</li>
<li>xAppntmnt is the Appointment object of Outlook.</li>
<li>xHC is simply my version of the VBA collection object. It allows to set entries via StItm() function and retrieve value via RdItm() function.</li>
<li>The handling of yearly recurring events is to be amended.</li>
</ul>
<br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">Public Function DoRecrrngs(aCDO, BgnDt, EndDt, aAppntmnts, Ppl, PrmtrTyp, Prmtr)<br /> Dim status, oAppntmnt, oPttrn<br /> Dim oHC As New HCllctn<br /> <br /> For Each oAppntmnt In aAppntmnts<br /> Set oPttrn = oAppntmnt.GetRecurrencePattern<br /> If oPttrn.PatternEndDate >= BgnDt Then<br /> status = oHC.StItm("BgnDt", BgnDt)<br /> status = oHC.StItm("EndDt", EndDt)<br /> status = oHC.StItm("IsAllDy", oAppntmnt.AllDayEvent)<br /> status = oHC.StItm("EvntTtl", oAppntmnt.Subject)<br /> status = oHC.StItm("EvntDtl", oAppntmnt.Location)<br /> status = oHC.StItm("Ppl", Ppl)<br /> status = DoRecrrng(aCDO, oHC, oPttrn, PrmtrTyp, Prmtr)<br /> End If<br /> Next<br />End Function<br />Public Function DoRecrrng(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br /> Dim status<br /><br /> Select Case aPttrn.RecurrenceType<br /> Case 0 ' Daily<br /> status = DoRecrrng0_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br /> Case 1 ' Weekly<br /> status = DoRecrrng1_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br />' status = -1111<br /> Case 2 ' Monthly (Day of Month)<br /> status = DoRecrrng2_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br />' status = -1121<br /> Case 3 ' MonthNth (weekday of Nth week)<br /> status = DoRecrrng3_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br />' status = -1131<br /> Case 4 ' ??<br /> status = -1141<br /> Case 5 ' Yearly (Day of Month)<br /> status = -1151<br /> Case 6 ' YearNth (Day of Nth week of Month)<br /> status = -1161<br /> End Select<br /> DoRecrrng = status<br />End Function<br /><br />' Daily - assuming aPttrn.PatternEndDate >= BgnDt<br />Public Function DoRecrrng0_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br /> Dim status, tmpDt, tmpNo, NDay<br /> Dim BgnDt, EndDt, IsAllDy, StrtTm, EndTm, Ppl, EvntTtl, EvntDtl<br /><br /> ' Retrieve useful info to local<br /> BgnDt = aHC.RdItm("BgnDt"): EndDt = aHC.RdItm("EndDt")<br /> IsAllDy = aHC.RdItm("IsAllDy"): Ppl = aHC.RdItm("Ppl")<br /> StrtTm = aPttrn.StartTime: EndTm = aPttrn.EndTime<br /> EvntTtl = strRplc("""", "", aHC.RdItm("EvntTtl")): EvntDtl = strRplc("""", "", aHC.RdItm("EvntDtl"))<br /> NDay = aPttrn.Interval ' Every N day<br /> tmpDt = aPttrn.PatternStartDate<br /> If tmpDt < BgnDt Then<br /> tmpNo = DateDiff("d", tmpDt, BgnDt)<br /> tmpNo = tmpNo + NDay - (tmpNo Mod NDay)<br /> tmpDt = DateAdd("d", tmpNo, tmpDt)<br /> End If<br /> DoRecrrng0_ = 0<br /> Do<br /> If tmpDt <= EndDt Then<br /> DoRecrrng0_ = DoRecrrng0_ + 1<br /> ' save the event to db<br /> status = Add2EvntTmp(aCDO, IsAllDy, tmpDt + StrtTm, tmpDt + EndTm, _<br /> Ppl, EvntTtl, EvntDtl)<br /> tmpDt = DateAdd("d", NDay, tmpDt)<br /> End If<br /> Loop Until tmpDt > EndDt<br />End Function<br /><br />' Weekly - assuming aPttrn.PatternEndDate > BgnDt<br />Public Function DoRecrrng1_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br /> Dim status, tmpNo, tmpDt, NWk, WkDyBt, WkDyMsk<br /> Dim BgnDt, EndDt, IsAllDy, StrtTm, EndTm, Ppl, EvntTtl, EvntDtl<br /><br /> ' Retrieve useful info to local<br /> BgnDt = aHC.RdItm("BgnDt"): EndDt = aHC.RdItm("EndDt")<br /> IsAllDy = aHC.RdItm("IsAllDy"): Ppl = aHC.RdItm("Ppl")<br /> StrtTm = aPttrn.StartTime: EndTm = aPttrn.EndTime<br /> EvntTtl = strRplc("""", "", aHC.RdItm("EvntTtl")): EvntDtl = strRplc("""", "", aHC.RdItm("EvntDtl"))<br /> NWk = aPttrn.Interval ' Every N week<br /> If NWk = 0 Then NWk = 1 ' Adjust Outlook daily weekday assigned value<br /> ' Prepare for begin date<br /> tmpDt = aPttrn.PatternStartDate<br /> If tmpDt < BgnDt Then<br /> tmpNo = DateDiff("ww", tmpDt, BgnDt)<br /> tmpNo = tmpNo + NWk - (tmpNo Mod NWk)<br /> tmpDt = DateAdd("ww", tmpNo, tmpDt)<br /> tmpDt = DateAdd("d", 1 - DatePart("w", tmpDt), tmpDt) ' Adjusted to Sunday<br /> End If<br /> ' Prepare weekday detection<br /> WkDyBt = 2 ^ (DatePart("w", tmpDt) - 1)<br /> WkDyMsk = aPttrn.DayOfWeekMask<br /> DoRecrrng1_ = 0<br /> Do Until tmpDt > EndDt<br /> If WkDyBt And WkDyMsk Then<br /> ' save the event to db<br /> status = Add2EvntTmp(aCDO, IsAllDy, tmpDt + StrtTm, tmpDt + EndTm, _<br /> Ppl, EvntTtl, EvntDtl)<br /> End If<br /> If WkDyBt = 64 Then<br /> tmpDt = DateAdd("ww", NWk, tmpDt)<br /> tmpDt = DateAdd("d", 1 - DatePart("w", tmpDt), tmpDt) ' Adjusted to Sunday<br /> WkDyBt = 1<br /> Else<br /> tmpDt = DateAdd("d", 1, tmpDt)<br /> WkDyBt = WkDyBt * 2<br /> End If<br /> Loop<br />End Function<br /><br />' Monthly (day of month) - assuming aPttrn.PatternEndDate > BgnDt<br />Public Function DoRecrrng2_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br /> Dim status, tmpNo, tmpDt, NMnth, NthDy<br /> Dim BgnDt, EndDt, IsAllDy, StrtTm, EndTm, Ppl, EvntTtl, EvntDtl<br /><br /> ' Retrieve useful info to local<br /> BgnDt = aHC.RdItm("BgnDt"): EndDt = aHC.RdItm("EndDt")<br /> IsAllDy = aHC.RdItm("IsAllDy"): Ppl = aHC.RdItm("Ppl")<br /> StrtTm = aPttrn.StartTime: EndTm = aPttrn.EndTime<br /> EvntTtl = strRplc("""", "", aHC.RdItm("EvntTtl")): EvntDtl = strRplc("""", "", aHC.RdItm("EvntDtl"))<br /> NMnth = aPttrn.Interval ' Every Nth month<br /> NthDy = aPttrn.DayOfMonth ' Nth day<br /> tmpDt = aPttrn.PatternStartDate<br /> If tmpDt < BgnDt Then<br /> tmpNo = DateDiff("m", tmpDt, BgnDt)<br /> tmpNo = tmpNo + NMnth - (tmpNo Mod NMnth)<br /> tmpDt = DateAdd("m", tmpNo, tmpDt)<br /> End If<br /> ' Adjust the date<br /> tmpDt = DateSerial(Year(tmpDt), Month(tmpDt), NthDy)<br /> ' Loop until pass EndDt<br /> DoRecrrng2_ = 0<br /> Do Until tmpDt > EndDt<br /> If tmpDt >= BgnDt And tmpDt <= EndDt Then ' Double sure<br /> DoRecrrng2_ = DoRecrrng2_ + 1<br /> ' save the event to db<br /> status = Add2EvntTmp(aCDO, IsAllDy, tmpDt + StrtTm, tmpDt + EndTm, _<br /> Ppl, EvntTtl, EvntDtl)<br /> End If<br /> tmpDt = DateAdd("m", NMnth, tmpDt)<br /> tmpDt = DateSerial(Year(tmpDt), Month(tmpDt), NthDy)<br /> Loop<br />End Function<br /><br />' MonthNth (Nth weekday) - assuming aPttrn.PatternEndDate > BgnDt<br />Public Function DoRecrrng3_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br /> Dim status, tmpNo, tmpDt, NMnth, NthWkDy, BtNoArry(), tmpFlg<br /> Dim BgnDt, EndDt, IsAllDy, StrtTm, EndTm, Ppl, EvntTtl, EvntDtl<br /><br /> ' Retrieve useful info to local<br /> BgnDt = aHC.RdItm("BgnDt"): EndDt = aHC.RdItm("EndDt")<br /> IsAllDy = aHC.RdItm("IsAllDy"): Ppl = aHC.RdItm("Ppl")<br /> StrtTm = aPttrn.StartTime: EndTm = aPttrn.EndTime<br /> EvntTtl = strRplc("""", "", aHC.RdItm("EvntTtl")): EvntDtl = strRplc("""", "", aHC.RdItm("EvntDtl"))<br /> NMnth = aPttrn.Interval ' Every Nth month<br /> NthWkDy = aPttrn.Instance<br /> tmpDt = aPttrn.PatternStartDate<br /> ' To the month just before BgnDt<br /> If tmpDt < BgnDt Then<br /> tmpNo = Year(BgnDt) * 12 + Month(BgnDt) - Year(tmpDt) * 12 - Month(tmpDt)<br /> tmpNo = tmpNo + NMnth - (tmpNo Mod NMnth)<br /> tmpDt = DateAdd("m", tmpNo, tmpDt)<br /> End If<br /> ' Get WkDy - MonthNth can't have multiple week day!<br /> tmpFlg = Lng2BtNoArry(aPttrn.DayOfWeekMask, BtNoArry, 1, "")<br />' If tmpNo > 1 Then ' weekday or weekend day<br />' tmpFlg = tmpNo<br />' DoRecrrng3_ = -1111 ' not handled for now<br />' DoRecrrng3_ = DoRecrrng3x_(aCDO, aHC, aPttrn, PrmtrTyp, Prmtr)<br />' Exit Function<br />' End If<br /> tmpNo = BtNoArry(1) ' Only one can be selected<br /> ' Adjust the date<br /> If tmpFlg = 2 Or tmpFlg = 5 Then<br /> tmpDt = NthWrkWkndDy2Dt(NthWkDy, tmpFlg, Month(tmpDt), Year(tmpDt), 1, "")<br /> Else<br /> tmpDt = NthWkDy2Dt(NthWkDy, tmpNo, Month(tmpDt), Year(tmpDt), 1, "")<br /> End If<br /> ' Loop until pass EndDt<br /> DoRecrrng3_ = 0<br /> Do Until tmpDt > EndDt<br /> If tmpDt >= BgnDt And tmpDt <= EndDt Then ' Double sure<br /> DoRecrrng3_ = DoRecrrng3_ + 1<br /> ' save the event to db<br /> status = Add2EvntTmp(aCDO, IsAllDy, tmpDt + StrtTm, tmpDt + EndTm, _<br /> Ppl, EvntTtl, EvntDtl)<br /> End If<br /> tmpDt = DateAdd("m", NMnth, tmpDt)<br /> If tmpFlg = 2 Or tmpFlg = 5 Then ' Adjust the date<br /> tmpDt = NthWrkWkndDy2Dt(NthWkDy, tmpFlg, Month(tmpDt), Year(tmpDt), 1, "")<br /> Else<br /> tmpDt = NthWkDy2Dt(NthWkDy, tmpNo, Month(tmpDt), Year(tmpDt), 1, "")<br /> End If<br /> Loop<br />End Function<br /><br />' Give the nth workday or weekend day and return the date<br />' Typ: 2(weekend day) 5(work day) other(error)<br />Public Function NthWrkWkndDy2Dt(aNth, aTyp, aMnth, aYr, PrmtrTyp, Prmtr)<br /> Dim tmpDt<br /><br /> NthWrkWkndDy2Dt = Null<br /> If aNth < 5 Then<br /> tmpDt = DateSerial(aYr, aMnth, 1)<br /> Cnt = 0<br /> Do Until Cnt = aNth<br /> WkDy = DatePart("w", tmpDt)<br /> If aTyp = 2 And (WkDy = 1 Or WkDy = 7) Then<br /> Cnt = Cnt + 1<br /> ElseIf aTyp = 5 And WkDy > 1 And WkDy < 7 Then<br /> Cnt = Cnt + 1<br /> End If<br /> NthWrkWkndDy2Dt = tmpDt<br /> tmpDt = DateAdd("d", 1, tmpDt)<br /> Loop<br /> ElseIf aNth = 5 Then<br /> tmpDt = DateSerial(aYr, aMnth, LstDyAMnth(aYr, aMnth, 1, ""))<br /> Cnt = 0<br /> Do Until Cnt > 0<br /> WkDy = DatePart("w", tmpDt)<br /> If aTyp = 2 And (WkDy = 1 Or WkDy = 7) Then<br /> Cnt = 1<br /> ElseIf aTyp = 5 And WkDy > 1 And WkDy < 7 Then<br /> Cnt = 1<br /> End If<br /> NthWrkWkndDy2Dt = tmpDt<br /> tmpDt = DateAdd("d", -1, tmpDt)<br /> Loop<br /> End If<br />End Function<br /><br />' Given nth weekday and return the date<br />' nth(5=last, <1 error="">5=error)<br />Public Function NthWkDy2Dt(aNth, aDyWk, aMnth, aYr, PrmtrTyp, Prmtr)<br /> Dim Dt<br /><br /> If aNth > 5 Then<br /> NthWkDy2Dt = Null<br /> Exit Function<br /> End If<br /> ' 1st day of that month<br /> Dt = DateSerial(aYr, aMnth, 1)<br /> If aDyWk < Weekday(Dt) Then<br /> Dt = DateAdd("d", aNth * 7 + aDyWk - Weekday(Dt), Dt)<br /> Else<br /> Dt = DateAdd("d", (aNth - 1) * 7 + aDyWk - Weekday(Dt), Dt)<br /> End If<br /> If aMnth < Month(Dt) Then<br /> Dt = DateAdd("d", -7, Dt)<br /> End If<br /> NthWkDy2Dt = Dt<br />End Function<br /><br />' BtNoArry(0)=number of bits numbers<br />' BtNoArry(n)=bit number + 1<br />' PrmtrTyp 0(reserved),<br />' 1(array of bit numbers where the bit is 1)<br />' 2(array of bits)<br />Public Function Lng2BtNoArry(Lng, BtNoArry, PrmtrTyp, Prmtr)<br /> Dim Sz, Ndx, NoItm<br /> Sz = Int(Log(Lng) / Log(2)) + 1<br /> ReDim BtNoArry(Sz)<br /> NoItm = 0<br /> If PrmtrTyp = 1 Then<br /> For Ndx = 1 To Sz<br /> If (Lng Mod 2) = 1 Then<br /> NoItm = NoItm + 1<br /> BtNoArry(NoItm) = Ndx<br /> Lng = Lng - 1<br /> End If<br /> Lng = Lng / 2<br /> Next<br /> Else<br /> For Ndx = 1 To Sz<br /> BtNoArry(Ndx) = Lng Mod 2<br /> Lng = Int(Lng / 2)<br /> Next<br /> NoItm = Sz<br /> End If<br /> BtNoArry(0) = NoItm<br /> Lng2BtNoArry = NoItm<br />End Function<br /><br />' Save outlook appointment to event table<br />Public Function Appntmnt2EvntTmp(aCDO, Appntmnt, Ppl, PrmtrTyp, Prmtr)<br /> Appntmnt2EvntTmp = Add2EvntTmp(aCDO, _<br /> Appntmnt.AllDayEvent, _<br /> Appntmnt.Start, _<br /> Appntmnt.End, _<br /> Ppl, _<br /> strRplc("""", "", Appntmnt.Subject), _<br /> strRplc("""", "", Appntmnt.Location) _<br /> )<br />End Function<br />' Save parameters to event table<br />Public Function Add2EvntTmp(aCDO, IsAllDy, TmBgn, TmEnd, Ppl, EvntTtl, EvntDtl)<br /> sSql = "INSERT INTO EvntTmp(AllDyEvnt, TmBgn,TmEnd,OwnrNm,EvntTtl,EvntDtl) VALUES" _<br /> & "(" & IsAllDy & ",""" & TmBgn & """,""" & TmEnd & """,""" & Ppl _<br /> & """,""" & EvntTtl & """,""" & EvntDtl & """);"<br /> Add2EvntTmp = aCDO.Exct(sSql, 1, "")<br />End Function<br /><br />' return the last day of a month<br />' PrmtrTyp: 0(reserved) 1(implemented)<br />Public Function LstDyAMnth(Yr, Mnth, PrmtrTyp, Prmtr)<br /> Select Case Mnth<br /> Case 1, 3, 5, 7, 8, 10, 12<br /> LstDyAMnth = 31<br /> Case 4, 6, 9, 11<br /> LstDyAMnth = 30<br /> Case 2<br /> LstDyAMnth = DatePart("d", DateAdd("m", 1, DateSerial(Yr, 1, 31)))<br /> Case Else<br /> LstDyAMnth = -1111<br /> End Select<br />End Function<!--1--></1></span></span>Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-74341754330269778382015-03-17T18:22:00.002-05:002015-04-11T05:34:42.893-05:00Cannot print exception string because Exception.ToString() failed<span style="font-family: Arial,Helvetica,sans-serif;">Just to report my case of the 'Exception.ToString() Failed' error.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">I was constantly working on various tasks on my machine (Windows & x64) and there would be times that I would install patches and then roll them back. </span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">In this particular case, I was installing a bunch of MS updates in the hope to resolve an Excel macro errors. Without success, I rolled patches back while Windows insisted to install some of the patches( I believe that I specifically asked to roll back a batch of patches, but Windows will re-install some patches after rolled back either during the shut down or the re-boot phase). </span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">At this point, I found that my .NET 2.0 C# code stop working. I can still compile the code but the program will simply crash without much of a clue - the compilation worked since I was able to copy the updated dll to other machines and worked just fine. I ended up testing a console program with a single WriteLine() statement. The program crashed the same way with the message 'Cannot print exception string because Exception.ToString() failed'.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">I googled and there were hints that pointed to the crashed Frameworks. Even though the .NET 2.0 was failed, I was able to compiled the same code in .NET 4.0 on the same machine and it worked.I then ran into articles that state that since Windows 7 was build on .NET 2.0 and 3.5, it is impossible to install the redistributable version on Windows 7.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">At that point, I was convinced that the Framework was crashed and I tried the sfc.exe in vein to fixed the problem. There seems to have a Framework tool from MS that can perform some sort of repairs. I, however, decided to check into available .net framework patches and applied them. That did the trick and the Excel, too, worked.</span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">Possible explanation?? The only thing I can think of is that, somehow, my roll back failed the .NET 2.0, which may due to Windows insisted on install certain patches.</span><br />
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-6111663615642311412015-03-08T10:23:00.001-05:002015-04-11T05:30:01.530-05:00Failure rate on Banggood's Arduino Nano circuit board Recently I began to experiment with Arduino - In my earlier life, I worked with electronics quite a bit.<br />
<br />
This post is to report my experience with the failure rate of a particular product from a particular vendor - do not over interpret.<br />
<br />
The product I evaluated is:<br />
http://www.banggood.com/5Pcs-ATmega328P-Arduino-Compatible-Nano-V3-Improved-Version-With-USB-p-951782.html<br />
<br />
The failure rate is 16% - 4 out of 25 Arduino nano board are bad.<br />
<br />
* This board needs driver from:<br />
http://wch.cn/downloads.php?name=pro&proid=5<br />
<br />
Problems ranging from:<br />
1. Unknown Device - PC recognized a USB device being attached but do not<br />
know what kind.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEQXjwYud47yfnPAsYGyxbH_c5bxt_g3hZuTYvrtVX1UhScBat_tqrXWKI2j-QxAij9yKaKCQZ_Npl3yy_Za_EwYT0GKNpS30EdftmtOmWj6Lipi615wmSICZtXFnLMuURryNM6YW0jtA/s1600/UnknwnDvc.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEQXjwYud47yfnPAsYGyxbH_c5bxt_g3hZuTYvrtVX1UhScBat_tqrXWKI2j-QxAij9yKaKCQZ_Npl3yy_Za_EwYT0GKNpS30EdftmtOmWj6Lipi615wmSICZtXFnLMuURryNM6YW0jtA/s1600/UnknwnDvc.PNG" height="400" width="335" /></a></div>
<br />
2. No Action:<br />
PC does not even a USB device is being attached.<br />
3. Not in sync. PC recognized the Nano and allocated COM5. But when try to<br />
upload a program, I receive the error message:<br />
avrdude: stk500_getsync(): not in sync: resp=0x00<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs809RdVDFFCJQ-844Tu8kIKzcs4T5Ipw2CtJwA03OrlheyVP2JTZUITE-eA3YcBHduEeu81BVtYuYzCjsEB3iqucmlV7XUFdp8MsZKCsPgGFUFgt3fNUNX6mpbEo27v0ALmDVLTP3Wlg/s1600/NotInSync.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs809RdVDFFCJQ-844Tu8kIKzcs4T5Ipw2CtJwA03OrlheyVP2JTZUITE-eA3YcBHduEeu81BVtYuYzCjsEB3iqucmlV7XUFdp8MsZKCsPgGFUFgt3fNUNX6mpbEo27v0ALmDVLTP3Wlg/s1600/NotInSync.PNG" height="256" width="400" /></a></div>
<br />
I will see what Banggood.com would do and report back. For now, just plan ahead and take the fail rate into your order and expecting 16% of your order could be bad.<br />
<br />
========= Update 20150411 ========<br />
Just got the replacement from Banggood. I am happy with their customer service. <br />
<br />
<br />
<br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-18585352279989343402014-04-17T00:35:00.000-05:002017-12-11T12:44:03.957-06:00CS0246: The type or namespace name could not be found (are you missing a using directive or an assembly reference?)This is a short note on the error message. I googled and none of those matched exactly what I did and none of them solved my problem.<br />
<br />
Since each development is different and many situation can raise the same error message. It is, therefore, important to describe my setups in order to be useful to my blogger readers.<br />
<br />
First of all, I am hand coding my code for the sack of purities. It should apply well to cases where more complicated environment is used.<br />
<br />
I created a user control with code behind: .ascx and .cs. I then use this user control in my web page: MyPage.aspx and MyPage.cs. For page derived .cs files, you will need to declare variables for controls that you used in MyPage.aspx. I can declare those variables for all the standard <asp:xxx> web controls. However, when I declared variable for my user control, the error message result. I did employed namespace for my user control and I did 'using' that namespace. However, the IIS Express wouldn't recognize my control until I explicitly declare the variable with full-namespace specification.</asp:xxx><br />
<br />
As with my previous post concerning IIS Express, this problem could be just the IIS Express issues. Even though, some of the Internet posts may suggest otherwise.<br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-45035780933363388962014-04-16T16:06:00.000-05:002017-12-11T12:44:39.013-06:00The server tag is not well formed. ASP.NET IIS Express aspx ascxWhen working with ASP.NET with IIS Express, I hand coded the user control .ascx file using the code behind approach.<br />
For
the <%@ Control > tag, the CodeBehind is for the .dll
file - not the .cs source file. To use the source file, you will have to
use the CodeFile attribute. To use the CodeBehind attribute, you also
have to put the .dll file in the \bin sub-directory - using ~\file.dll
in the CodeBehind will not work as other directives tags (i.e. ASP.NET @ tags).<br />
<br />
There is a problem with IIS Express when parsing the XML comment (i.e.
). Somehow, the IIS Express will try to look for 'runat' inside the
comment area and try to interpret it as server tag. This prevents commenting
out server tags when needed. By altering the text: runat (e.g. runat_), you can
avoid the problem caused by this bug. This problem applies to .aspx and .ascx files.<br />
<br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-2789315456258312132014-03-21T00:44:00.000-05:002017-12-11T12:45:21.708-06:00MS ACCESS 97 2002 upgrade 3264 TableDef errorError message: "Run-time error '3264': No field defined--cannot append TableDef or Index."<br />
<br />
Code at: EnblLnkTbl():CurrentDb().TableDef.Append tdf <br />
<br />
When: upgrade my Ipds424.mdb (In ShrScr\ ) to ACCESS 2002.<br />
<br />
Resolution: In the -Tool -Reference:<br />
Replace: 'Microsoft DAO 2.5/3.5 Compatibility Library'<br />
With: 'Microsoft DAO 3.6 Object Library'<br />
<br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-39587813748793678572014-02-23T21:28:00.000-06:002014-02-23T21:28:27.034-06:00Windows Screen Recording Open Source softwareJust few notes on my experiences with Windows open source Screen Recording Software.<br />
<br />
When google it, Cam Studio came up top. Reading Wikipedia article was warned about viruses embedded in the Cam Studio. Found a website called LO4D.com and is safe to download from it. With Cam Studio, you can use encoder already installed on your Windows machine. Try to use the Microsoft one. Cam Studio stored recording in the AVI format which can be read by Microsoft Movie maker. By saving the video in NTSC format, you can upload it to YouTube.<br />
<br />
I also played with Krut, which is based on Java and required install the normal JRE plus the JMF (java medial framework). The Krut worked well except that you do not have much choices on the encoder - it will output QuickTime format and a separate audio file in Microsoft format. The problem with the Krut is that when you record with 16 bit audio encoding, the VLC would complain and the audio would not play. The QuickTime seems to work fine. I suspect, you will need encoding software to make it more useful.<br />
<br />
Another program I played is called rdp, which is also Java based. The program is at version 0.1. It worked by can't record Video and Audio at the same time yet.<br />
<br />Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-30912107153222128352014-01-15T23:21:00.000-06:002014-01-15T23:21:30.404-06:00A Possible Internet News Feed Design<span style="font-family: Arial, Helvetica, sans-serif;">The behavior of human varies. Watching news on TV is very different from reading news on computers. While watching TV, people are free to do other things as long as their ears or eyes are paying attention to the TV.</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">For people reading news on computers, the assumptions is that their hands are on mouse or keyboard so that they can scroll or click through pages.</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">However, as many of you have noticed websites, like MSN or Yahoo, that with marqueue pictures, users could simply watch the slide show without touching the mouse or the keyboard, which can be the case when programmers or office workers are taking breaks eating lunches.</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">Since computer and websites are flexible in terms of programmable. These sites can easily be enhanced to provide better features - like topic selection, large subtitles, adjustable shuffle speed, voice annotated ... etc. With voice activation enhancement, this can further free office workers to perform other activities while follow up with news. </span>Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0tag:blogger.com,1999:blog-8574013375253744423.post-69017849350443743902014-01-15T04:30:00.000-06:002017-12-11T12:46:30.218-06:00VPN failed - Error 711, 1068 - Remote Access Connection Manager, dependency<span style="font-family: "arial" , "helvetica" , sans-serif;">The goal of this article is to report an instance of mine that failed me on my VPN. Hopefully, this will help people with exactly the same problem.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The error involved the failing of the starting of "Remote Access Connection Manager" service - Error 711: Cannot load the Remote Access Connection Manager Service. Trying to start the </span><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">"Remote Access Connection Manager" service manually produced the "Error 1068: the dependency service or group failed to start." message.</span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The 1068 error is a very general one and the task is to find out exactly which dependency services caused the program to fail since the error message provides no indication. Not being a Windows expert, I result to brutal force. I manually went through each service listed and try to start them. In the process, few processes failed to start. The most suspicious one is the "Windows Event Log" process - "Cannot start windows event log service on Windows 7. Error 4201".</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">After fixing the "Windows event log" error, the VPN worked.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">The article I Googled are:</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://answers.microsoft.com/en-us/windows/forum/windows_7-networking/error-711-cannot-load-the-remote-access-connection/61ef37bd-b21b-4aad-a38c-0a3c9048af5a">Error 711: Cannot load the Remote Access Connection Manager Service.</a></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://social.technet.microsoft.com/Forums/windows/en-US/bb191e46-6c4d-4830-9654-0a040892aca5/error-1068-the-dependency-service-or-group-failed-to-start-buisness-enviroment?forum=w7itproinstall">Error 1068: the dependency service or group failed to start.</a></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/cannot-start-windows-event-log-service-on-windows/e2c218ad-8637-49ee-8023-50eae0e4ddcb">Cannot start windows event log service on Windows 7. Error 4201.</a></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://www.netsquirrel.com/msconfig/msconfig_win7.html">How to use MSCONFIG in Windows 7</a></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;"> </span> </span><br />
<br />
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com7tag:blogger.com,1999:blog-8574013375253744423.post-33504411520520453002013-11-08T23:26:00.000-06:002013-11-08T23:45:06.490-06:00Configure phpBB forum subscription by administrator via phpMyAdmin<span style="font-family: Arial,Helvetica,sans-serif;">As a lot of phpBB administrators found out that phpBB does not provide tools for administrators to set forum subscription for users. The intention of the phpBB is definitely a good one. However, in practice, as some of the administrators will agree that some administrator control can help grow the community.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">The ethic behind the phpBB design apparently is based on the idea of no-spam. Forum user should have the ultimate say on what topic or forum he or she would like to subscribe, which most of us with common senses would have agreed. However, with my observation of the behavior of today's web surfers, there are quite few of them are lived in a very fast pest live and would not pay much attention to a lot of messages like: The user agreement, The user guide, or any community rules.</span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">Rules and laws of a community all work around human behaviors. The design of computer software and social media should also work around human behavior. As long as the citizen and the forum user have the ultimate control, the system did not violate their right. In the case of the phpBB, the user does have some kind of ultimate control by routing forum notices to their junk mail box even though that really isn't an appropriate solution.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">With regarding to the previous discussion, personally, I believe phpBB could made the following changes:</span><br />
<ol>
<li><span style="font-family: Arial,Helvetica,sans-serif;">Allow users to remove themselves from the forum and delete their email information from the system.</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">An option for user to explicitly disable the forum to send email to them.</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">Give administrator the right to set forum subscription settings.</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">Allow administrators to force one forum subscription.</span></li>
</ol>
<span style="font-family: Arial,Helvetica,sans-serif;">The item 4 above isn't as intrusion as it is sound since users are allowed to remove themselves from the system in case administrators abuse the privilege of serving their users.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">Having the discussion out of the way, here is a way to set forum subscriptions to users by forum administrator by adding entries into the database table. The table that controls the forum subscription is forum_watch. By adding entries to that table, you force the user to subscribe to a forum.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;">The user_id is stored in the user table and the forum_id is stored in the forum table.</span><br />
Duncanhttp://www.blogger.com/profile/04317978389184676101noreply@blogger.com0